1. you should wait until loading is complete to start your setInterval.
2. you should clear your interval before setting it (to prevent run-away intervals).
3. you're only loading one image with that code so your comment about the only one activating makes no sense.
I'm trying to understand ways to use setInterval (a simple concept I can't seem to work with =]) Simply Id like to know the best way to tween one object into another with a pause inbetween. I can get one transition to work, when I use another the setinterval gets in the way.
My understanding of inerval: it needs to be set outside a function, and then calls that function in a time set (with a clear), So It starts at launch. When I've tried to place it in a function and then clear it in another function. it didn't clear.
I can get that first tween to work. The image sits on the stage for 4 seconds and then tweens. When I try to repeat the action it messes up or dosent work, because I've set a setinterval outside a function and triggers but at the wrong spot or inside the next called function (onMotionFinished), but wont clear.
Can you give any clarity on what to do to get the set interval to work properly
use an onMotionFinished handler (applied to your tween) to detect when a tween completes. in that handler use setTimeout() to call another function that starts the next tween.
THANK YOU!!! Some new useful code to use. I'll experiment with this.
I went to adobe resource to get a quick view of the code and its use/syntax. It appears that the set inteval in a general timer best used for repeatative (single actions/functions) settimeout is used to switch/delay different functions.
Thank you again