1
votes

The question is as follows: If I have a MovieClip that plays infinitely, will it still consume extra resources (cpu time, memory and what not) when it is not a child of anything on the stage (i.e. not visible).

I'm wondering if it is safe to just call removeChild() or do I need to call stop() before each remove child?

2

2 Answers

0
votes

Yes, that is correct, even if it is not on the stage, it is using resources as those instances are actually playing. You are correct, in that you need to call stop() even if you remove it from the stage.

If you are making a game and you are pooling sprites that have animations, this is important to be aware of. Especially if your animations have tweens as those tweens are actually taking up processing cycles.

0
votes

when you call stop() or removeChild(), the movieclip or the children is still playing, the sound in the movieclip is still playing. recommended using spritesheet instead of movieclip.