PDA

View Full Version : setInterval problem [FMX]



blah-de-blah
August 19th, 2003, 03:25 AM
Ok so i have another problem :(

This is the code i have:


this.onEnterFrame = function() {
setInterval(_root["box"+i], bouncer(), 1000);
};


And i'm trying to target "box"+i to play the function bouncer every second. But instead of just targeting what i want, it targets everything on stage, so everything on stage has the function bouncer called :-\

How should i change it so it only targets what i want? thanks!

kode
August 19th, 2003, 05:14 AM
setInterval(_root["box"+i], "bouncer", 1000);

blah-de-blah
August 19th, 2003, 09:35 AM
Thanks kax, but now i think i have realized that this shouldn't be the main problem. I think i'll be openin a new thread :P