A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Smooth Scene Transitions?

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    10

    Smooth Scene Transitions?

    Okay, I'm a newb - but I know there is an easy fix to this with a few lines of actionscript.

    Check out MatthewStaver.com Beta Site- click 'Enter'.

    The Flash movie pops up and I have each of the major sections in their own respective scenes. This is basically just a gallery that dynamically loads the pictures from the images directory (they're not really up yet, just a placeholder for now).

    So, if you click around, you'll see that there is NO smooth transition from scene to scene. It just starts on frame 1 of the scene selected. In each scene, for about the last 50 frames or so, I have a closing animation to make a smooth transition to the next scene selected (the thumbnails fade and the title drops away). But these last 50 frames of each scene are getting ignored as the movie goes directly to the next scene that was clicked.

    My question is: When a menu button is selected, how do I make it to where the rest of that current scene plays out and THEN it goes to the next scene of the one that is selected?

    If I could get it to do that, everything would go smoothly between scenes. Also, I'm not really good with actionscripting so if you could help, I'd REALLY appreciate it.

    After getting this issue solved, all I will need is to put up the pics and then I'm done!
    Last edited by guitarwez; 09-10-2003 at 10:16 PM.

  2. #2
    Minion of Gozer The Destructor lemurofdoom's Avatar
    Join Date
    Jul 2003
    Posts
    123
    what does all your code look like now? how is your file set up?

    basically i woudl do it like this: what your button should do is make the current scene go to the beginning of the part where it fades out, and also it needs to set a variable to the name of the scene to go to after the fading happens. and on the last frame of every scene, a frame action should tell it to play whatever scene was set in the variable.. i'd be more specific with actual code but i dont know how you have everything set up...

  3. #3
    Junior Member
    Join Date
    May 2003
    Location
    University of Oregon
    Posts
    18
    the best way to do that I can think of is to put the script on the end of the fifty transition frames. That means that the last frame of your scene has actionscript on it that tells it to gotoAndPlay the next scene that you want. Them button merely tells the currently loaded scene to continue playing, instead of going to the next scene.
    then there is another road block to get around, and this requires you to learn enough actionscript to understand variables.
    Each button on the menu needs to set a variable to be input into the actionscript at the end of the 50 transition frames. You with me here?
    For example, without going into code, it would look like this:

    Button 1 needs to load scene 1
    scene 2 is currently loaded

    actionscript for button one:
    tell scene to to play through to end
    set variable nextScene=scene 1

    actionscript for last frame of scene 2:
    tell movie to goto variable "nextscene", frame 1

    This makes it so that each button changes the code at the end of the currently loaded scene. However, don't forget that variables are created in locations, and in order to call on a variable, you need to refer to it by it's name and location.

    Hope this gets you going in the right direction.

    gabe

  4. #4
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233
    Gabe, I am interested in doing the same sort of thing. The way you broke it down and explained it for us newbee's is great, but do you have a tutorial or example that you could post for both of us to see just exactly what and how you go about doing what you said? Thanks in advance, I appreciate the help.
    -Persistent1

  5. #5
    Junior Member
    Join Date
    May 2003
    Location
    University of Oregon
    Posts
    18
    no, sorry, I don't have a tutorial. I'm a student at the U of O and I'm in the last part of a crazy term, so I'm over my head in work. to tell you the truth, I haven't even opened flash in the last three weeks. I'd love to help you out however i can, although unfortunately, I don't have time to write a tutorial right now. Write me an email and ask any questions you have about scene transitions. I'm by no means an expert, but maybe I can give you a quick explanation that will send you in the right direction.

    gabe

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