views:

6

answers:

1

Imagine you have 100 tweens. Each tween is simply an element (circle) that goes up, and then comes down again. By delaying each tween a bit from the previous, a sine wave effect is created.

Now all this is working fine. The problem arises when you switch to another window or application, and then view the window with animation again. Then the time-offsets between the tweens are gone, and there are a bunch of straight lines moving up and down instead of a sine wave .... The more you switch between windows, the more they "clump together" ...

I suspect there is some processor scheduling or something ike that causing the 'clumping' ...

Does anyone know what exactly is going on and is there something you can do about it ?

A: 

Do you remove your EventListeners after resetting? If not, your method could be called multiple times and could cause the "clumping".

If you do so, please show your code, so that we can have a look.

Tobias Kun
No, each tween is started again when "OnComplete" of the same tween fires, so there is no possibility of the tween firing twice ...
Run CMD
Yes but do you reset everything when you switch the window? So when you get back everything is initialized and start again? Please show some code!
Tobias Kun
Ok i'm sorry for misunderstanding you. Thought of an application in flash itself. So i don't know if you noticed, that when you are loading an flash application and then switch to another tab, process will stop until you switch back. Perhaps it affects your animation in the same way. I think the best way for prevent it, would be to create a precompiled animation.
Tobias Kun