Ok, have another quandry.
I have an explosion class that, among other things creates and stores an
instance of an explosion clip that runs for 5 frames.
Each instance of the explosion class created is in turn attached to an
array (shotExplosions[]).
Explosions are added to the playfield clip by:
thePlayfield.addChild(shotExplosions[num].getExplosion());
(where num is an index number)
My quandry is, how do I track and remove the clip when its done playing?
I tried adding
parent.removeChild(this);
directly to the explosion moveclip timeline in the 5th frame, which sort
of works. The problem is, the explosion animation does a sudden jerky
slowdown before completing and then generates the output error:
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at explosion/::frame5()
Can anyone recommend a correction, or is there just a completely simpler
way to do this? To sum it up, all I want to do is have the clip removed
from the thePlayfield display list when its done playing.
Marty
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com