├── README.md ├── commands ├── [mm] Bitmap Selection to MovieClips.jsfl ├── [mm] Check Flump library.jsfl ├── [mm] Check for empty clips in library.jsfl ├── [mm] Compile All.jsfl ├── [mm] Create labels.jsfl ├── [mm] Duplicate advanced.jsfl ├── [mm] Flump files in directory.jsfl ├── [mm] Frame to left.jsfl ├── [mm] Frame to right.jsfl ├── [mm] Log framelabels.jsfl ├── [mm] Log instance names - getChildByName.jsfl ├── [mm] Log instance names.jsfl ├── [mm] Multiple library rename.jsfl ├── [mm] Multiple selection rename.jsfl ├── [mm] Name it right!.jsfl ├── [mm] Organize layers.jsfl ├── [mm] Organize library.jsfl ├── [mm] Random instance swapper.jsfl ├── [mm] Random rotation.jsfl ├── [mm] Rename across layer.jsfl ├── [mm] Rename library items.jsfl ├── [mm] Selected Library Items to MovieClips.jsfl ├── [mm] Selected Library Items to Sprites.jsfl ├── [mm] Selection to MovieClips.jsfl ├── [mm] Snap Selection to pixel.jsfl ├── [mm] Snap to pixel.jsfl └── [mm] Transform selection manager.jsfl └── images ├── autorenamelayer-explanation.jpg ├── duplicate-advanced.gif ├── loginstancenames-explanation.jpg ├── nameitright-explanation.jpg └── selectiontransformmanager-explanation.jpg /README.md: -------------------------------------------------------------------------------- 1 | # JSFL scripts 2 | > For Adobe Flash CS4, CS5, CS6 and CC / Adobe Animate CC 3 | 4 | ### Introduction 5 | 6 | This is a place for sharing of Flash productivity tools, to work faster, better, well-organized and highly efficient. These tools are also known as Flash extensions, commands or JSFL files. 7 | 8 | ### The tools 9 | 10 | * Library tools 11 | * Duplicate advanced - Deep copies timelines 12 | * Name it right! - Better alternative for 'symbol properties' window 13 | * Organize library - places all images/videos in folders 14 | * Selected Library Items to MovieClips 15 | * Selected Library Items to Sprites 16 | * Multiple library rename 17 | * Selection tools 18 | * Transform selection manager - Apply (ralative/absolute) transformation on multiple objects 19 | * Selection to MovieClips 20 | * Bitmap Selection to MovieClips 21 | * Snap Selection to pixel 22 | * Multiple selection rename 23 | * Random rotation 24 | * Timeline tools 25 | * Organize layers - auto renames all layers / cleans up empty layers 26 | * Rename across layer 27 | * Frame to left 28 | * Frame to right 29 | * Random instance swapper 30 | * Create labels 31 | * Coding helper tools 32 | * Log framelabels 33 | * Log instance names - getChildByName 34 | * Log instance names 35 | * Document tools 36 | * Compile All (open documents) 37 | 38 | Some of the tools are explained in [these blogposts](http://blog.stroep.nl/category/jsfl-2/) 39 | 40 | ### How to install jsfl files 41 | 42 | Copy the .jsfl files to this folder on your computer: 43 | 44 | #### Windows 7: 45 | `C:\Users\%USERNAME%\AppData\Local\Adobe\Flash CC\en_US\Configuration\Commands` 46 | 47 | #### Windows Vista: 48 | `C:\Users\%USERNAME%\Local Settings\Application Data\Adobe\Flash CC\en_US\Configuration\Commands` 49 | 50 | #### Windows XP: 51 | `C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Adobe\Flash CC\en_US\Configuration\Commands` 52 | 53 | #### Mac OS X: 54 | `C:/Users/%USERNAME%/Library/Application Support/Adobe/Flash CC/en_US/Configuration/Commands` 55 | 56 | ### Disclaimer 57 | 58 | Not all tools seem to work in Flash CC. 59 | -------------------------------------------------------------------------------- /commands/[mm] Bitmap Selection to MovieClips.jsfl: -------------------------------------------------------------------------------- 1 | /** 2 | * Bitmap Selection to MovieClips 3 | * @version 1 4 | * @author: Mediamonks - http://www.mediamonks.com 5 | * @author: Mark Knol - http://blog.stroep.nl 6 | */ 7 | 8 | fl.outputPanel.clear(); 9 | 10 | var doc = fl.getDocumentDOM(); 11 | 12 | if (!doc) 13 | { 14 | alert("Please open or create a flashfile."); 15 | } 16 | else 17 | { 18 | SelectionToMovieClips(); 19 | } 20 | 21 | function SelectionToMovieClips() 22 | { 23 | var selectedItems = doc.selection; 24 | 25 | if (!selectedItems || !selectedItems.length) 26 | { 27 | alert('Select at least 1 item on stage') 28 | return; 29 | } 30 | 31 | var alignments = ["top left", "top center", "top right", "center left", "center", "center right", "bottom left", "bottom center", "bottom right"]; 32 | 33 | //var prefix = prompt('Enter new name (prefix):', '') 34 | var dialogXML = '' 35 | 36 | dialogXML += '