Having trouble with stage handling movieClips.
Hi there!
I am creating a Quiz where the user selects one of the two multiple choice options. If correct, the user is prompted to click on the star movieclip which depicts it moving
and being placed on the star templates at the bottom. After the scene has completed this tween, it automatically spawns in a star at those coordinates.
For some reason, the first star is staying throughout the whole process, however, the other stars if correct, are being removed from the stage once the next question has been answered as correct.
Scene where user must click on star to add it:
var starOneClaimed:Boolean = false;
stop();
star.addEventListener(MouseEvent.CLICK, claimStar);
Correct.play();
function claimStar(evt:MouseEvent):void
{
starOneClaimed = true;
Sparkle.play();
gotoAndPlay(52);
}
If the user gets the answer correct, (starOneClaimed) -> spawn one in at the exact coordinates of the template so that it stays there for the next 6 questions (7 total):
import flash.display.DisplayObject;
stop();
if(starOneClaimed)
{
var starOne:ClaimedStar = new ClaimedStar();
starOne.x = 200;
starOne.y = 357;
stage.addChild(starOne);
}
It is adding it to the stage, however, once the second star has been claimed (2nd question), and the 3rd question is asked, it removes the 2nd star from the stage. And this process repeats for each question asked, the star before is removed.

When this button is clicked to continue to the next question:

Notice there is a star in the top left, however the coordinates are the same except the x is altered a small part from the others. I dont understand. Help please?!
