3 Replies Latest reply on May 13, 2013 8:46 AM by Ned Murphy

    Quotation marks in ActionScript

    cathrinastor1

      Hi,

       

      I'm a complete flash novice and I'm having a few issues. Some friendly advice would be really appreciated!

       

      When I've used actionscript to, for instance, link to another  scene or to input a personalised welcome message for the user it seems  to ignore the green text in quotation marks (in the first instance,  which scene it is to go to, and not displaying the  word welcome before the input data.

       

      I don't know if I've described the problem adequately but does anybody have any idea what I've done wrong?

       

      Thanks.

        • 1. Re: Quotation marks in ActionScript
          Ned Murphy Adobe Community Professional & MVP

          If you show the code that doesn't work it will be easier to say whether it's the code or not.

          1 person found this helpful
          • 2. Re: Quotation marks in ActionScript
            cathrinastor1 Level 1

            on (release) {
                gotoAndPlay("Scene 2", 1);
            }

            • 3. Re: Quotation marks in ActionScript
              Ned Murphy Adobe Community Professional & MVP

              The code looks okay, except I will recommend two things...

               

              1) Don't place code 'on()' objects.  Use the timeline and instance names instead.

               

              ex:  yourBtn.onRelease = function(){

                           gotoAndPlay("Scene 2", 1);

                    }

               

              2) avoid using scenes unless some instructor is demanding their use.  Use movieclips and/or sections of the scene 1 timeline.

               

              As far as troubleshooting your issue, if the code is suposed to stop at that frame then use gotoAndStop() instead of gotoAndPlay()

               

              If it is supposed to play starting at frame 1 of scene 2, then put a trace in the first frame to see if it goes there... ex: trace("in scene 2"); ...  it is possible it is going there but leaves so fast you never see what is there.

              1 person found this helpful