Forward and back button functions overlap?
I'm sorry if this is a really dumb question but It doesn't seem to be an error, but more it's just how flash works so I have no idea how to fix it.
Dropbox - Argh I don't understand.swf
Dropbox - Argh I don't understand.fla
I've got this at the start
function Play1(event:MouseEvent):void
{
gotoAndPlay("Scene_1");
}
function Play2(event:MouseEvent):void
{
gotoAndPlay("Scene_2");
}
function Play3(event:MouseEvent):void
{
gotoAndPlay("Scene_3");
}
And this on my frames
Back_button.addEventListener(MouseEvent.CLICK, Play3);
Next_button.addEventListener(MouseEvent.CLICK, Play2);
If you don't want to download my example, the problem is that after a frame is revisited, the forward and back buttons no longer function properly so I'm guessing the script is overlapping or something?
I also have another problem. If I try to make something invisible, it will default back to being visible when I click to go to the next scene.
Cube_hide.addEventListener(MouseEvent.CLICK, fl_ClickToHide);
function fl_ClickToHide(event:MouseEvent):void
{
Cube.visible = false;
Cube_hide.visible = false;
Cube_Show.visible = true;
}
Cube_Show.addEventListener(MouseEvent.CLICK, fl_ClickToShow);
function fl_ClickToShow(event:MouseEvent):void
{
Cube.visible = true;
Cube_hide.visible = true;
Cube_Show.visible = false;
}
Cube_Show.visible = false;
The show and hide buttons sit on top of each other which is why they make each other visible.
So yeah if you can help me in any way, even if it's just what to look up, I'd appreciate it greatly.
