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 »