flash question
- Started
- Last post
- 7 Responses
- tonks
hi,
I have a point in my movie where i need to remove a certain set of mc's inorder for another movie that is being loaded in run better. I tried making them all invisible but I guess thats not the same as unloading the mcs themselves cos it still ran really slowly... but I dont really get how that works?...
_parent.object1.removeMovieClip...
this bit of code doesnt want to work and how would I get back the mc back anyway?
Have i opened a can of worms.
- UndoUndo0
you probably dont need to unload it .just stop it running with stop(), clear any intervals running inside it or any onEnterFrame calls inside it.
it is these things that slow down the movie not the mcs themselves
- canuck0
use attach mc, then removeMovieClip();, re-attach when needed?
just an idea. actionscript isnt really my bag.
- imakedesign0
my_mc._visible= false; is better than my_mc.alpha=0; as flash does not have to draw the movie clip.
- tonks0
yeah that sounds about right but now i think i have opened a can of worms. ..
Whats the code look like to clear intervals? and then how would I reactivate them?
- UndoUndo0
var myInt = setInterval(functionName, TineInMIlliseconds)
sets an interval
clearInterval(myInt) clears the interval.
you probably havent set any intervals if you dont know what that is. The best thing to do is to stop any timelines playing when you dont need them by targeting the mcs with animations like _root.myMC.stop()
or stop any onEnterFrame calls with
delete _root.myMC.onEnterFrame(). hope NT lets the code through
- UndoUndo0
thats all good
- tonks0
cool.. thanks for your help!