Hi everybody,
I had some little experience in AS2 and now I'm trying to code a simple application with AS3. I have several scenes there:
Intro
Video
Question
First 2 scenes are empty for now, on the Question scene I placed stop(); on actions layer and then I created a button symbol, made it's instance name btn_play and put this code into actions layer:
Code:
stop();
btn_play.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
play();
}
So when you click on the button it should continue playing. But I get an error and the button doesn't work. Here's an output:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flash_fla::MainTimeline/frame3()
Looks like I don't have that instance there yet, but how can that be? Appreciate any help with it.