3 Replies Latest reply on Oct 10, 2011 5:39 AM by Ned Murphy

    Newbie needs help! When published flash ignores stops

    alisoncutler

      Hello all

      I am VERY new to flash, so please excuse my ignorance!

      I am trying to build a brief questionnaire (only 4 questions in all) which results in telling you which product you need.

      I have added in a page with just one button to start the questionnaire, followed by pages with radio buttons (all named etc) but when I publish it, it doesn't stop - can you please tell me what I am doing wrong?

       

      I have action code added as follows:

       

      ***Frame 1***

      stop();

      button_click_here_to_start.addEventListener(MouseEvent.CLICK, gotoq1);

      function gotoq1(event:MouseEvent):void {

      gotoAndStop("q1 gas or oil");

      }

       

       

      ***Frame 30***

      stop();

      q1_gas.addEventListener(MouseEvent.CLICK, gotoq2);

      function gotoq2(event:MouseEvent):void {

      gotoAndStop("q2 copper or steel");

      }

      q1_oil.addEventListener(MouseEvent.CLICK, gotoq3);

      function gotoq3(event:MouseEvent):void {

      gotoAndStop("q3 copper or flexihouse");

      }

       

       

      ***Frame 60***

      stop();

      q2_copper.addEventListener(MouseEvent.CLICK, gotoq2result);
      function gotoq2result(event:MouseEvent):void {gotoAndStop("need boostaboiler");
      }

      q2_steel.addEventListener(MouseEvent.CLICK, gotoq2resultsteel);
      function gotoq2resultsteel(event:MouseEvent):void {gotoAndStop("need x2 boostaboiler");
      }

       

      ***Frame 90***

      stop();

      q3_copper.addEventListener(MouseEvent.CLICK, gotoq3result);
      function gotoq3result(event:MouseEvent):void {gotoAndStop("q4 thickness");
      }

      q3_flexihose.addEventListener(MouseEvent.CLICK, gotoq3resultflexihose);
      function gotoq3resultflexihose(event:MouseEvent):void {gotoAndStop("flexihose sorry");
      }

       

      ***Frame 120***

      stop();
      q4_1cm.addEventListener(MouseEvent.CLICK, gotoq4result);
      function gotoq4result(event:MouseEvent):void {gotoAndStop("need boostaboiler flex");
      }

      q4_more.addEventListener(MouseEvent.CLICK, gotoq4resultmore);
      function gotoq4resultmore(event:MouseEvent):void {gotoAndStop("need boostaboiler");
      }

       

      Any advise gratefully received!

      Many thanks, Ali

        • 1. Re: Newbie needs help! When published flash ignores stops
          Ned Murphy Adobe Community Professional & MVP

          Are you getting any error messages?  At first glance your code seems fine and it should stop at frame 1.  But if you are getting error messages, then flying thru the timeline is one symptom of an error in the file's coding.

           

          Maybe what you can do is start from the start and comment out the remaining frames' code until you narrow down the problem.  GEt frame 1's code to work, then frame 30, etc....

           

          To comment out an entire section of code you can use ...   /*   all the code  */

           

          You might also want to check to make sure your publish settings are set to be using AS3.

          • 2. Re: Newbie needs help! When published flash ignores stops
            alisoncutler Level 1

            Hi Ned

             

            Thanks for looking....but have just realised the error of my ways!!  I had a set of buttons duplicated identically which must have messed things up.  As soon as this was corrected, then it publishes with stops.

             

            Interestingly though, this doesn't show anywhere as an error.  Unless there is somewhere where I can see duplicate errors?

             

            Thanks anyway.

            Ali

            • 3. Re: Newbie needs help! When published flash ignores stops
              Ned Murphy Adobe Community Professional & MVP

              I'm not sure why it ran the timeline then.  If I recreate the basics of the scenario, it stops on frame 1 and the object that is sitting highest in the display list gets the listener.  In any case, you've solved it.