A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Moving to next scene.

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    13
    Probably a basic issue for most of you, but I am having trouble moving to a new scene within my movie. The movie is made up of 3 scenes. At the end of the first scene, I have buttons that allows a user to move to the next scene or skip to the third scene. Both the buttons work fine with a simple goto command.

    If the user chooses to view the presentation (scene2) I would like the last frame of that scene (scene 2) to send them automatically to scene 3. So, I figured that I would just place an action on the the last frame within that movie that says, ---gotoAndPlay ("scene3", 1);---. I even tried a few variations of this which basically say the same thing. ---ie. nextScene ();---- For some reason, this isn't working. The movie plays fine but stops at the end of scene 2 when it should be jumping to scene 3 via the action on the last frame of scene 2. Confused yet?

    So basically, I am able to move from scene to scene via a mouse event (onrelease) on a button, but I'm unable to move to the next scene via an action on the last frame of a movie? Is there something I'm doing wrong - or something I could have missed?

  2. #2
    i think that if, say, scene1 ends on frame 101
    scene2 picks up on frame 102
    so try gotoAndPlay ("scene3", x); x being last frame in previous scene + 1
    i think

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Posts
    127
    Try to put a stop in before the GotoandPlay command. and make sure that you don't have a top or anything in scene 3 or that might be your problem. Make sure that when you put in the goto thing that you select scene number and not frame number. i hope that helps you

  4. #4
    Junior Member
    Join Date
    Dec 2000
    Posts
    13

    moving to next scene via frame action

    Originally posted by Beer Baron
    Try to put a stop in before the GotoandPlay command. and make sure that you don't have a top or anything in scene 3 or that might be your problem. Make sure that when you put in the goto thing that you select scene number and not frame number. i hope that helps you
    Thanks Beer, but the stop didn't seem to work. I put it on the same frame (end of scene 2) as the goto action item. The movie plays and stops at the end of scene two?

    I checked scene 3 and there is nothing that appears to be stopping scene 2 from moving right into scene 3? There is probably something simple I'm missing, but I can't figure it out. Any other ideas? Shouldn't 1 scene go to the next automatically or do you have to tell it to go from one scene to the other?

    thanks
    Jim


  5. #5
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi..
    I've just done a mock up, and it seems to work ok, so it must be something basic your missing. If all looks fine then try using a frame label instead:

    gotoAndPlay ("Scene 3", "labelScene3");

    Best of luck.

  6. #6
    Junior Member
    Join Date
    Dec 2000
    Posts
    13

    ?

    Originally posted by skinney
    i think that if, say, scene1 ends on frame 101
    scene2 picks up on frame 102
    so try gotoAndPlay ("scene3", x); x being last frame in previous scene + 1
    i think
    Hey Skinney - thanks for the help, but I still can't seem to figure this out. It seems like it would be so very simple to navigate from one scene to another via a simple action, but there must be something I'm missing. I tried something similar to your suggestion above using a simple expression on the last frame of scene 2. ---gotoAndPlay (_currentframe + 1);----

    I also tried --nextscene()-- and gotoAndPlay (scene3, 1);--to no avail! I didn't try your specific suggestion as I'm not sure how many total frames are in scene 1 & 2 as it is a fairly large swf with many different movies. I would have to go in and count every frame in each movie. Is there a simpler way to do this?

    thanks for your help.
    jim

  7. #7
    Junior Member
    Join Date
    Dec 2000
    Posts
    13

    navigating scenes

    Originally posted by Marx
    Hi..
    I've just done a mock up, and it seems to work ok, so it must be something basic your missing. If all looks fine then try using a frame label instead:

    gotoAndPlay ("Scene 3", "labelScene3");

    Best of luck.
    Thanks for giving it a shot Marx. I must be missing something. It just doesn't want to go to scene three unless I'm using an action on a button.

    I used the statement above with my scene names & info ("site" is the name of scene 3 and "start" is the frame 1 label of scene 3). Nothing happens. It just sits at the end of scene 2 after an animation finishes.

    gotoAndPlay ("site", "start");

    thanks though...

    Hey, I noticed you are a senior member. Since I have two items that are stalling this project of mine, I'd like to ask you another question if I could...

    In scene 3, I load an external swf that works fine when testing the swf. Unfortunately, since my swf is within a frame, the loadMovie action doesn't seem to work. Is there a way around this?

  8. #8
    i'm sorry i didn't mean litteraly enter "+1" i just meant the result eg 102 if 101 is the last frame in the previous scene. i'm not 100% on this i'll have to try it myself. sorry for any confusion.

  9. #9
    President, save the
    New Zealand dollar foundation

    Join Date
    Jun 2000
    Posts
    1,743
    If you label the frame you can forget about the scene name...say you label the first frame in scene 3 "scene3label"
    then have the action:
    _root.gotoAndPlay("scene3label");

    or
    this.gotoAndPlay("scene3label");
    both of these should work with no problems...
    8)

  10. #10
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi jivaldi

    "In scene 3, I load an external swf that works fine when testing the swf. Unfortunately, since my swf is within a frame, the loadMovie action doesn't seem to work. Is there a way around this?"

    I'm not entirely sure I understand what your asking. I put this script on frame 10 of my movie to load another movie:

    loadMovieNum ("test2.swf", 1);

    Make sure the movie you are loading 'resides in the same directory' as your main movie otherwise you wont be able to load it.
    Sorry if this wasn't what you meant, thought I would try and answer it anyway.

    Merry Christmas!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center