Simple script : Still Error #1009 --> Not using Actions in frame 2?
Hi,
I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Untitled_fla::MainTimeline/frame1()
And i think it is because of the fact that Actions are only in frame 1 and not in 2.
But how do i get Actions to work in frame 2 as well?
This is my code:
stop();
import flash.display.MovieClip;
import flash.events.MouseEvent;
var button1 : MovieClip =button1Mc;
var button2 : MovieClip =button2Mc;
button1.stop();
button2.stop();
button1.addEventListener(MouseEvent.CLICK,goto2);
button2.addEventListener(MouseEvent.CLICK,goto3);
function goto2(e:MouseEvent):void {
gotoAndStop(2,"Scene 1");
}
function goto3(e:MouseEvent):void {
gotoAndStop(1,"Scene 1");
}
Can anybody tell me how to get it to work?
Merel