6 Replies Latest reply on Jan 9, 2007 1:44 PM by aniebel

    Navigation between Scenes.

    Bergg Level 1
      Hello folks,
      I have created 3 Scenes (webpages) for my website. Could anyone give me an advise what AS I should put in buttons if I want a website viewer go from Scene 1 to Scene 3. And also, where exactly should I place that AS. What I did was this. I had placed following AS on the last frame of the button in the timeleine of Scene1:
      on(release); {
      gotoAndPlay ( Scene3, frame1);
      It is obviously wrong, because it does not work.
      Thank you guys for any suggestions
        • 1. Re: Navigation between Scenes.
          aniebel Level 2
          Hi, using scenes is not recommended. Try setting your site section all on one timeline by using keyframes and frame labels.

          Other than that, you have incorrect syntax in your code. If I get stuck, I always double check my syntax against what Flash Help says. If you look up "gotoAndPlay" in Help, it shows this:

          Notice how there are quotes around the scene number and the frame is only the number... nothing else.
          • 2. Re: Navigation between Scenes.
            Bergg Level 1
            Thank you Amy for your input.
            I am new into Flash so I try to do it as simple as possible. I made all those three Scenes as Movie clip symbols now, so I have three movie clip symbols placed on Main stage as frames 1,2 and 3.
            I assigned AS to the button on page 1 (which is frame 1 on main stage) to go to frame 2. (I want a viewer to go to page 2 of my website)

            on(release) {
            AS check says no errors but navigation still does not work.
            • 3. Re: Navigation between Scenes.
              aniebel Level 2
              ok, try this... do a "save as" and set your movie up like this...
              Add two layers to the top of your main timeline. Name the top one "actions" and the second one "labels". Lock both layers so you don't accidentally place movie clips, text etc. on them. Now, let's say you have 20 frames of stuff in your first Scene. Give yourself some playing room and create a new keyframe on the top two layers at frame 40. On the labels layer, click keyframe one and name it "section1" (or whatever you wish) in the Properties panel. Do the same thing for your second and third scene/sections. All of this occurs in the main timeline in Scene 1.

              Go to both your second and third scene, select all the layers and frames and "Copy frames" by right-clicking and choosing that from the context menu. Then go back to the first scene, place your cursor on the corresponding keyframe and "Paste frames". Once you've done that for both scenes, you can tidy it up by puttng the layers from each scene within a layer folder and naming it for that scene.

              Now go to your actions layer and insert a stop(); in each keyframe for each "scene". Go back to frame one in the actions layer and add this:
              • 4. Re: Navigation between Scenes.
                aniebel Level 2
                oops, sent too soon. This is assuming that the 3 buttons you have for your sections have the instance names of "scene1_btn" etc. and the frame labels are "section1" etc. You can name them whatever you want though so long as the code reflects it. ("home_btn", "about_btn"...)

                If you don't put a stop(); on each keyframe, it will just keep on playing. That may be what you ran into already.
                • 5. Re: Navigation between Scenes.
                  Bergg Level 1
                  thank you so much for your help.
                  • 6. Re: Navigation between Scenes.
                    aniebel Level 2
                    You're welcome. Let me know if it works for you.