actionScript as java
Java
code posted
by
UIDEV
created at 28 Nov 23:40
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
/** * Execute Specified ActionItem for each array Element but waits for an EnterFrame Events before each execution. * It is better to use this function is the actionItem is long to execute. This way Flash will be able to refresh the screen between iterations. * Before executing the ActionItem the array element index will be written in $AFE_Name variable and the array element value * will be written in $AFE_Value variable. * @param arrayName * @param vovAction is a ActionItemId or a XML string containing Adjustor Actions <actions>... * @return number of elements in the array * @adjustor */ public function arrayForEachFrames(arrayName:String, vovAction:String):int { var vsActionItem:StringVariable = new StringVariable(this, vovAction); var isXML:Boolean = (vsActionItem.string.substr(0, 9) == "<actions>"); var cnt:int; if (isArgumentAVariable(arrayName)) { arrayName = readRaw(ExtractVarNameFromArgument(arrayName)); } var o:Object = arrayGet(arrayName); if (o) { for (var name:String in o) { var params:Array = new Array(); params.push(vsActionItem.string); params.push(name); params.push(o[name]); _app.taskMan.addTask(this, taskArrayForEach, params); cnt++; } if (cnt) _app.taskMan.startTasks(); } return cnt; } |
1.36 KB in 3 ms with coderay