TypeError: Error #1009: Variable
So I make a as3 timeline. And this hapen
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at arrow_Scene1_fla::MainTimeline/frame2()
The code at frame 2 is
stop();
var myscore = 0;
score.text = "$" + myscore;
var mylive = 3;
live.text = "Live:" + mylive;
var myspin = 0;
spin.text = "Spin:" + myspin;
btn_play.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):void
{
gotoAndPlay(5);
}
btn_rule.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);
function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
{
gotoAndPlay(3);
}
btn_credit.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);
function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
{
gotoAndPlay(4);
}
The bolded one is I suspect the cause.
Here's a thing
a) No matter what, when I'm making a variable for score. That message appear. Even a new file. ONLY
RARE CASE WHEN THAT MATTER DOESN'T MATTER.
Old file not affected, but new file does.
b) The bolded syntax, no matter where I move it, the error follows. The old frame err message gone
