PDA

View Full Version : Is there any way to dynamically call functions in actionscript?


maxxrafen
09-15-2005, 09:46 PM
for(x=1;x<=num_of_things;x++){
eval("thing" add x) .gotoAndStop("needed_place");
}


I know the above code won't work, but I'm hoping that it gets my question across.

I want to know if there is a way to call functions in movie clip instances defined by a variable. Thanks for your time.

blixt
09-15-2005, 09:54 PM
this["thing"+x].gotoAndStop("needed_place");

maxxrafen
09-16-2005, 03:31 PM
this["thing"+x].gotoAndStop("needed_place");


Thanx!


You just made my day!

Any chance you know the code to make a UIcomponent lose focus?