I use Flex for the majority of my Flash related work, even for writing plain ActionScript. Lately I've barely even used the Flash authoring environment to create stuff. When I do use the Flash authoring environment, it's mostly for automation and prep work of content. If you are like me, you write JSFL to do that stuff.
I love automating redundant tasks. One thing that bugs me when importing graphical assets to Flash's stage is having to resize the document to what I imported. I like that I can do this by going to the Document Properties and setting the document to match the content size, but if I have to do this each time I import/export content it becomes a irksome chore. I write JSFL scripts that run tasks on multiple files, having a "match contents" function would be useful to me in my case...maybe to you as well. I do not see a JSFL way to do this. (Maybe there is and I had a brain fart?). Until then, here is a script I wrote to do it in JSFL...
Read the rest of this entry »
1 Comment »
Posted by: Keith H in JSFL, tags: JSFL
When creating a new symbol for MovieClips and other instances you must give them a name a second time again in the Properties panel. For me this can be annoying sometimes. (I name my instances the name I plan to later identify them with actionscript.)
Here is a modification of the "findObjects" I posted earlier. This is handy if you are the type of person that names your symbol items with names you intend to use as their instance name as well.
Maybe you will find this useful or know improvements, either way let me know your thoughts.
Read the rest of this entry »
1 Comment »
Posted by: Keith H in JSFL, tags: CS3, Flash 8, JSFL
Here's a JSFL function for returning an Array of all elements with a given instance name in whole Flash Document.
I was trying to make something like JavaScript's "getElementsById()" method.
My intent was to make this compatible with both Flash 8 and CS3 IDEs.
Note: Unfortunately, this method will not find elements that are grouped.
Let me know if this is helpful or if there is a better way to do this.
Example:
fl.outputPanel.clear();
var items=findObjects("mybox");
var n=0;
while(n < items.length){
items[n].rotation=45;
n++;
}
alert("Found "+items.length+" items.");
Read the rest of this entry »
1 Comment »