This content has been marked as final. Show 11 replies
you should use removeMovieClip() instead of unloadMovie() if you want to remove the instance, its properties and handlers. in addition, the movieclip's instance name is tl["fire"+i], where tl is the timeline where that movieclip is created and i is the value when of the variable i, when that movieclip was created.
if you're having trouble, it's because you haven't defined tl or you've change i since your movieclip was created.
i can't help resolve your problem with more information. how many "flames" might be existant when the timeline reaches frame 90? and is the timeline that reaches frame 90 the same one that contains your above code?
I copied the code from frame 2 into frames 3-20 to give the fire a more realistic look. The AS attached to the symbol motion tween , which is on layer l is:
scale = Number (random (50)) + 30;
set Property (_target, _x, Number (../:x) + Number (random (12)) -6);
setProperty (_target, _yscale, scale);
I have the AS for duplicating the movie sitting on the layer above this.
The best way i think is to create all your flames clip inside another clip.....and at frame 90 just remove the container clip which holds all of them........
By the way at frame 90 how are you deleting the fire clips that you have created ....
does removeMovieClip kill setInterval residue?
probably not, but i don't know what you mean by "setInterval residue".
before I found setTimeout() I built an application that runs 24/7 purely on timers passed via XML, or self generated. Its pretty complicated, but during the process I had a great deal of trouble with uncleared setIntervals. Call me an irresponsible coder, but I'd like a way to be able to drop the setInterval if I need to kill the movieClip w/o having to code in separate functions to keep the "setInterval residue" clean.
(say an XML fail in the middle of another MC running a timer)
anyway, thats what I mean by setInterval residue.
the removeMovieClip() does not currently terminate intervals that are properties of the removed movieclip. however, it's easy enough to extend the flash methods in general and easy enough to do what you want, in particular.
using the code below will extend the removeMovieClip() method to also clear all intervals that are properties of the (to be) removed movieclip: