mercredi 30 septembre 2015

Error #1009 Cannot access a property or method of a null object reference for quiz with timer and score

I've been creating a quiz with timer and score. But I've this errors which on the frame 2:26 and frame1:11. Stated there, my object was null but I've declared it as movieclip. Can someone help me?

FRAME 2:26

 start_btn.addEventListener(MouseEvent.CLICK, quizHandler1)
    function quizHandler1 (event:MouseEvent):void
    {
        if(mygroup1.selection.label == "Is")
        {
            myscore+=10; nextFrame(); 
            smiley.visible = true;
        }

        else
        {
            nextFrame(); //HERE IS THE ERROR
            smiley.visible = false;
        }
    }

FRAME 1:11

//import flash.events.MouseEvent;

stop();

start_btn.addEventListener(MouseEvent.CLICK, startQuiz)

function startQuiz(event:MouseEvent):void
{
    nextFrame();
    }

Here is my .fla file in the dropbox. http://ift.tt/1RhcVaj

Aucun commentaire:

Enregistrer un commentaire