Hello everyone,
I’m trying to link 2 frames to each other by buttons
when i press on bt1 - it takes me to frame no’2. that OK. (bt1 exists only on frame 1)
when i press on bt2 - it takes me to frame no’1 that Ok, but gives me a NULL REFERENCE ERROR. and i can’t press on bt 1 again.
** bt1 is my button that don’t work (and exist only on frame 1)
** bt2 is the other button that work and exist in both frames
Both are inside some movieclips as you can see.
Here’s Frame 1 code:
stop();
import flash.events.MouseEvent;
this.centralPartofHP_insNm.amiteiFixMenu_insNm.[COLOR=red]bt1[/COLOR].addEventListener(MouseEvent.MOUSE_DOWN,gotoFrame2 );
function gotoFrame2(event:MouseEvent):void{
gotoAndStop(2);
}
and Frame 2 code
stop();
import flash.events.MouseEvent;
this.topMenu_insNm.[COLOR=red]bt2[/COLOR].addEventListener(MouseEvent.MOUSE_DOWN,gotoFrame1 );
function gotoFrame1(event:MouseEvent):void{
gotoAndStop(1);
}