Hey guys,
So i have this flash game with couple of different scenes
And im trying to remove all of the movieclips when the scene ends because i keep getting a loop of errors, for example this one
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at BlobBobScenes_fla::MainTimeline/star()
I have tried removing these
*else if (mcMain.hitTestObject(level1.goal))
{
trace(“Level 1 Completed”)
gotoAndStop(“1”,“Scene 6”);
removeChild(mcMain);
removeChild(level1);
stage.removeEventListener(KeyboardEvent.KEY_UP, checkKeysUp);
mcMain.addEventListener(Event.ENTER_FRAME, star);
}*
“level1” is the movieclip that contains everything except for the character.
Any ideas on how to remove everything from the stage when the character hits the goal ??
Thanks