Actionscript 3: Simple Button

I am working on a project in which a button is clicked, and the frame jumps and stops at a certain area. The button I have is called cancelmenu_btn. It is spread over 1 keyframe (over 5 frames) on an actions layer. The coding for the back button is:

menuback_btn.addEventListener(MouseEvent.CLICK, menubackClick);
function menubackClick(event:MouseEvent):void{
    gotoAndStop (2);

Yet, the back button only works on one of the frames - frame 3. I have a link to my project:

What am I doing wrong with the menuback_btn?


There are a few things you have to check if you want the button active. First, make sure your code is on the first frame because it does not become active until that frame hits.

Second, make sure your button is also on the first frame, but then it will associate your btn.addEventListener(Function) correctly.

Need Your Help

How does Java handle arguments separated by |?

java methods arguments

How does Java handle arguments separated by | ?

primefaces north layout unit disappears on dialogue's resize

jsf java-ee layout primefaces jsf-2.2

i was developing my jsf web app using primefaces framework, and i come across to this strange behavior, when i resize the dialogue on my page the north layout unit disappears, what is more strange is