-
RSS
-
Recent Posts
- Bulk swap elements from timelines by tagging their layers
- Remove empty folders from library
- Find and Replace Library Names and Linkages using JSFL
- Automatically assign AS3 class linkages to library Bitmaps using JSFL (CS4+)
- Planning flash movieclip hierarchy using photoshop layers
- Bug: flash psd importer crashes when “ok” button is hitted
- Bug: flash psd importer bring text scaled, in wrong font-size
- Bug: flash psd importer adds an extra instance of a movieclip inside the assets folder
- Create unique and hierarchy-oriented layer names using Photoshop Scripting
- Setting up and using flash PSD importer to bring bitmaps and create movie clips
- Add AS2 linkage identifiers to library Bitmaps or Movie Clips using JSFL
- Automatically assign AS3 class linkages to library MovieClips using JSFL
- Publish all opened FLA files using JSFL
- Photo or lossless? Automatically choose the optimized Bitmap compression using JSFL
- Set AllowSmoothing for all Bitmaps using JSFL
Subjects
Category Archives: JSFL
Remove empty folders from library
Oh, this is a simple trick, but might be useful if you have a huge library. You know… when you use the “remove unused items” and flash does forget to remove the folders
function remove_empty_folders(doc){
for( var i = 0; i < doc.library.items.length; i++){
var item=doc.library.items[i];
var item_name=item.name;
var item_name_length=item_name.length;
[...]
Find and Replace Library Names and Linkages using JSFL
Another script to save programmer’s fingers. It replaces words in library, including linkages and package names. Case sensitive. So, if you want to replace all class linkages from the package “com.test1″ to “com.test1.specific”, it’s an instant. It asks which is the word to substitute, and by which word. Hit ok, and it’s done.
function find_and_replace_in_library(){
[...]
Automatically assign AS3 class linkages to library Bitmaps using JSFL (CS4+)
This script prompts you to choose the package for the linkages that will be added. Then, it search for all not yet linked bitmaps in library. When it find anyone, it set the class name based in the library item name.
Unfortunately, it won’t work on CS3.
function add_linkage(doc){
var package=prompt(‘Choose a package or live [...]
Bug: flash psd importer adds an extra instance of a movieclip inside the assets folder
This is probably the mostly exhotic post of this blog. I have several times had problems with this bug, so I’ve built a script to correct it. Flash PSD importer, in rare occasions, create non-desired movieclips inside of the desired movieclips. These bastards come nested inside the Assets folder of the “real movieclip”, and are child [...]
Also posted in flash psd importer Tagged bitmap, bugs, flash psd importer, jsfl, movie clip Leave a comment
Add AS2 linkage identifiers to library Bitmaps or Movie Clips using JSFL
These are scripts to add AS2 linkage identifiers to items in library. Linkage is added to all those items that don’t yet have it assigned. This may make things a lot faster and less boring when you need to give maintenance to old projects.
This first script add linkage identifiers to movieclips.
function add_linkage(doc){
var library=doc.library;
[...]
Automatically assign AS3 class linkages to library MovieClips using JSFL
This script prompts you to choose the base class and package for the linkages that will be added. Then, it search for all not yet linked movieclips in library. When it find anyone, it set the class name based in the library item name.
function add_linkage(doc){
var base=prompt(‘Choose a base class’,‘flash.display.MovieClip’);
var package=prompt(‘Choose [...]
Publish all opened FLA files using JSFL
I’ve built this once I was performing changes in a core script I use in every actionscript application. To avoid definition conflicts, every change demanded re-compiling the 16 fla of the current project. I was a little bit tired of hitting shift+F12. So, this script publishes all opened FLA files according to their own [...]
Photo or lossless? Automatically choose the optimized Bitmap compression using JSFL
This script compile the current FLA twice for each bitmap, testing the best compression for each of them and choosing the virtually most advantageous one. It ignores bitmaps marked as “useImportedJPEGQuality”.
function bitmap_quality(doc){
var doc_path_uri=getFolderURI(doc.path);
var tempFile=path.substr(0,doc_path_uri.lastIndexOf(‘/’))+‘/temp.swf’;
var library=fl.getDocumentDOM().library;
var items=library.items;
var items_length=items.length;
for( var h = 0; h < items_length; h++){
var item=items[h];
[...]
Set AllowSmoothing for all Bitmaps using JSFL
Today we have two very simple JSFL scripts to make this happen unpainfully.
To turn on:
var library=fl.getDocumentDOM().library;
var items=library.items;
var items_length=items.length;
for( var i = 0; i < items_length; i++){
var item=items[i];
if(item.itemType==‘bitmap’){
item.allowSmoothing=true;
}
}
Click here to download
To turn off:
var library=fl.getDocumentDOM().library;
var items=library.items;
var items_length=items.length;
for( var i = 0; i < items_length; i++){
var item=items[i];
if(item.itemType==‘bitmap’){
item.allowSmoothing=false;
}
}
Click here [...]
Bulk swap elements from timelines by tagging their layers