This content has been marked as final. Show 3 replies
I tried this and it doesn't seem to work for me.
I have a class that loads an image and resizes a masking movie clip to the size of the loaded image. I used the Tween class to animate the resizing.
I have several buttons set up to load various images. Clicking a button to load a new image before the current Tween has finished resizing causes problems. The first Tween seems to continue and the image jumps to the size of the second image suddenly.
It seems to me that the first Tween is continuing and does not get removed.
I can post my class file if you are interested.
According to XRAY I am able to see the OnEnterFrameBeacon when the Tween instance is created. XRAY is giving its instance name “__OnEnterFrameBeacon”. So I am not sure if you explicitly delete that if it will help or be harmful. Perhaps you can ‘null’ your tween instance, ‘tween0’. But I would assume that the FlashPlayer’s garbage collector would remove it.
I'm not sure what's happening, but it seems that when I create a second Tween both Tween's are still running. I can't seem to get rid of Tween.
The onEnterFrameBeacon seems to be a movie clip in the _global layer that Tween subscribes to for onEnterFrame messages. Tween adds itself to it's own listener list and to the listener list of onEnterFrameBeacon. I'm guessing that a Tween would need to be removed from both listener lists.