Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy do my buttons only work on the first frame of the main timeline in Flash AS3?
    primarykey
    data
    text
    <p>I'm trying to code the navigation of a Flash AS3 project in an actionscript file. In the project there are several frames with buttons to navigate through the project. The ones I have coded for the first frame work, but on any other frame they don't. </p> <p>here is the code: </p> <pre><code>package { import flash.display.MovieClip; import flash.events.MouseEvent; public class Main extends MovieClip { public function Main() { trace("it's working"); btn_one.addEventListener(MouseEvent.MOUSE_UP,eventResponse1); btn_two.addEventListener(MouseEvent.MOUSE_UP,eventResponse2); btn_three.addEventListener(MouseEvent.MOUSE_UP,eventResponse3); btn_four.addEventListener(MouseEvent.MOUSE_UP,eventResponse4); btn_five.addEventListener(MouseEvent.MOUSE_UP,eventResponse5); btn_six.addEventListener(MouseEvent.MOUSE_UP,eventResponse6); } function eventResponse1(evt:MouseEvent):void { gotoAndStop("game"); } function eventResponse2(evt:MouseEvent):void { gotoAndStop("specimenroom"); } function eventResponse3(evt:MouseEvent):void { gotoAndStop("how"); } function eventResponse4(evt:MouseEvent):void { gotoAndStop("game"); } function eventResponse5(evt:MouseEvent):void { gotoAndStop("feedback"); } function eventResponse6(evt:MouseEvent):void { gotoAndStop("home"); } } } </code></pre> <p>In the code the first five buttons work, but the sixth doesn't. This button is not located on the first frame of the main timeline, it's on the second and third frame. It doesn't work at all. What code is needed to get them to work? Any help is much appreciated, thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload