Tag Archives: bitmap

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 [...]
Posted in JSFL | Also tagged , , | Leave a comment

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 [...]
Posted in JSFL, flash psd importer | Also tagged , , , | Leave a comment

Create unique and hierarchy-oriented layer names using Photoshop Scripting

So, here we have two similar layer lists. At left one is how I naturally organize my PSD files in photoshop. And at right how I like to have them to import them to flash as movie clips, using flash psd importer. Manually organize layers like those in the right is boring even for the most [...]
Posted in flash psd importer, photoshop scripting | Also tagged , , , , | 1 Comment

Setting up and using flash PSD importer to bring bitmaps and create movie clips

Importing flash materials asset-by-asset may be very painful and can take a long time to get completed. It encourage disorganization, since It’s double work to organize the library and follow a strict name standardization when we are manually bringing materials in. Besides that, the manual process provides great risk of human error, and I also believe [...]
Posted in flash psd importer | Also tagged , | 1 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;   [...]
Posted in JSFL | Also tagged , , | 1 Comment

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];   [...]
Posted in JSFL | Also tagged , , , , | 1 Comment

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 [...]
Posted in JSFL | Also tagged , | Leave a comment