2 Replies Latest reply on Dec 13, 2006 6:55 AM by linzi007

    Play another scene, how?

    Fr4ntic
      Hi there,
      I'm really new to flash, tough I have used it abit in school.
      But now I'm making a little flashmovie for a schoolwork, and now I am stuck at a place.
      I have got almost every scene done, only problem is that they aren't in the places they should be (i.e scene 4 should be scene 2, etc).

      So I tried to add this action:
      gotoAndPlay("4","Layer 1");
      which should tell it to play scene 4, but instead it do play scene 2.
      I maybie use the wrong action, but I hope someone is willing to help me out here.

      Thanks in advance.
        • 1. Re: Play another scene, how?
          Level 7
          Fr4ntic,

          > So I tried to add this action:
          > gotoAndPlay("4","Layer 1");
          > which should tell it to play scene 4, but instead it do
          > play scene 2.

          I notice that your first parameter is in quotes, "4," which means Scene
          4 is expected to have the name "4" ... does it? Your second parameter is
          also in quotes, which means you're attempting to send the playhead not only
          to another Scene, but also to a named frame label, whose name is apparently
          "Layer 1" ... is it? :)

          > I maybie use the wrong action, but I hope someone
          > is willing to help me out here.

          It looks like you're using the right ActionScript, but I'm not sure
          you're using it correctly. Have you read the ActionScript 2.0 Language
          Reference's gotoAndPlay() entry?

          Long time Flash users are aware of a bug in the Flash Player -- possibly
          corrected with ActionScript 3.0 -- that results in problems when combining
          ActionScript and Scenes. Rather than specifying a Scene name, just
          reference unique named frame labels, instead. :)


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Play another scene, how?
            linzi007
            Hi

            Click window > otherpanels> scene (this will display your scene panel)
            here you can re-name and re-order you scenes (just drag and drop to re-order)

            now your ActionScript should read

            stop();
            gotoAndPlay("menu", 1);

            where menu is the name of the scene and 1 is the frame number.

            Hope this helps