Skip to main content
October 23, 2011
Question

HELP ADOBE AS3! Playing frame twice is not working

  • October 23, 2011
  • 1 reply
  • 550 views

okay so I'm almost done with my website, but i got really stuck on the last part.

i have a main page that works perfectly wen i just open my site, in it are buttons that takes me to three other minor pages, there are buttons in the minor pages that takes you back to the main page. when i click on these buttons and get i succesfully get to the mainpage, the codes don't work anymore and i cant click on the buttons to go to the minor pages :S!!! WHAT IS THE PROBLEM :'(.. it works in the begining and then it does't this doesnt make sense:

this is the code i use:

stop();

buttons.buttonmotion.addEventListener(MouseEvent.CLICK, klk);

function klk(event:MouseEvent):void {

gotoAndPlay("motionreal");

}

stop();

buttons.buttonmodeling.addEventListener(MouseEvent.CLICK, hhh);

function hhh(event:MouseEvent):void {

gotoAndPlay("modelingreal");

}

stop();

buttons.buttonprint.addEventListener(MouseEvent.CLICK, kjk);

function kjk(event:MouseEvent):void {

gotoAndPlay("printreal");

}

stop();

buttons.buttonweb.addEventListener(MouseEvent.CLICK, lkk);

function lkk(event:MouseEvent):void {

gotoAndPlay("webreal1");

}

stop();

buttons.buttonaboutme.addEventListener(MouseEvent.CLICK, sos);

function sos(event:MouseEvent):void {

gotoAndPlay("aboutmereal");

}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
October 23, 2011

stop() is a timeline command, so you only need to have it once in your frame code to stop the timeline there.

As far as the buttons not working anymore... it sounds like when you leave the main section you leave the main section buttons behind as well, and when you return you do not return to the frame where they are assign their code.  Is that what you have?  If so, you need to return to a frame where the code is assigned to the buttons.

October 23, 2011

i tried making it go back the the mainpage by frame number and by label, and it actually does but the codes don't work anymore, and the codes are on top of that frame number and label name. i have the mainpage and other pages, all inside a movieclip.. called "masterclip" could that be the problem?

my buttons are inside two movieclips, could that be the problem?

im desperate for help ive been trying to finish my website for 3 months now, thats crazy!!!
thanks for the reply , i hope u can solve me problem

October 23, 2011

this is the code i used, from the minor page to the mainpage :

stop();

exit.addEventListener(MouseEvent.CLICK, kkk);

function kkk(event:MouseEvent):void {

gotoAndPlay(1);

}