A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Duplicating Scenes

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    18
    Hi.

    I have a movie which will be made up of a lot of scenes. I used the goto part to move to a second scene (which I've duplicated from the first scene) from clicking on a button. Ive set the frame at 210 (to play). I changed the second scene around a bit so that it's different...

    The problem is when I test it, when I click the button it just plays scene 1 (or what I assume is scene 1) from frame 210.

    Any suggestions?

    I'd be exceptionally grateful.

  2. #2
    Senior Member
    Join Date
    Jun 2001
    Posts
    206
    Your question's a little vague...

    You just want to jump to the second scene when a button is pressed?

    Here's some things you can check anyway:
    - Check which scene is on top in the scene panel, the scene on top gets played first.
    - Check the code under the button, make sure it says something like
    Code:
    on (release) {
        nextScene ();
    }
    If that doesn't help, try and make your question a little clearer and I'll see what I can do

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    18

    hey..

    Hi

    Thanks for your advice... Okay, lets see if I can explain this a little better...

    My movie has a menu at the top of the flash movie. Under the menu is the welcome text, etc. It takes roughly 210 frames (the first scene) I want to be able to click the menu buttons and they should take me to the another scene so as that the user of my site can navigate their way around.

    So I've duplicated the first scene (so that I have everything all in the exact place, i.e menu / background pic and so on) and I wanted the first scene to take me to frame 210 of the second scene.

    In the button actions I had this:

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


    but it just seems to be looping the end of scene 1.

    Ahh, I'm really sorry, I'm hopeless at explaining technical stuff, but this is driving me batty.

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Posts
    206

    hmmm

    Well, I don't really know, it should work regarding the code, but I'll probably have to see for myself, so you can send me the .FLA (treminator2@hotmail.com) and I'll see what I can do for you.

  5. #5
    Junior Member
    Join Date
    Jun 2001
    Posts
    18

    thanks

    Thanks Volando

    I've sent the .fla to your email.

    --MadManSitch

  6. #6
    Senior Member
    Join Date
    Jun 2001
    Posts
    206
    I altered your .FLA and it should work now.
    Problem is that you have your buttons in a Movie Clip (actually a graphic, but I turned it into a MC) so there's no such thing as a "Scene 2" within the MC itself.

    Since I haven't figured out yet how to jump back to the main timeline and then jump to scene 2, I solved it differently.
    I added one line at your main time-line, one frame after the end of your movie and added this action:
    Code:
    gotoAndPlay ("Scene 2 ", 210);
    I gave it the frame label "jump" and under your button I added this script:
    Code:
    on (release) {
        _root.gotoAndPlay("jump");
    }
    So, all that happens is when pressing the button it jumps back to the root (in Scene 1) to the "jump" label where it's told to advance to the next scene.

    I know it seems a bit awkward and I think there must be a better way to do it, but it works and that's what counts in this case

    Hope this helps you enough to get started with the other buttons!

    Good luck!

  7. #7
    Junior Member
    Join Date
    Jun 2001
    Posts
    18

    oh no...

    Oh dear...

    Um...I'm gonna just nod and smile and say thanks and sit here until I make some sense of what I'm doing now since I am so very lost lol.

    aaaahhhhhhhhhhhh I feel so dumb!!!

    thanks all the same.


  8. #8
    Senior Member
    Join Date
    Jun 2001
    Posts
    206
    Don't be so hard on yourself dude, after all Flash is hard to get into, I had the same problems when I started using Flash (luckily a couple of years ago now, but I also keep encountering new problems as I go along).

    But to go back to your problem;
    First of all it isn't the best method to animate everything on the main timeline, it's easy to get lost when your movie gets bigger, so I would strongly advice you to put most of the animations (scrolling images and such) inside seperate Movie Clips. That way it's much easier to keep track of what you're doing and it's also easier to position it on the main stage.
    You can use TellTargets to start or stop animations.

    For the "jumping to scene" problem I think I didn't give you the best solution. Ofcourse, you can add an additional keyframe behind the "jump" frame with some code that makes you jump to scene 3 and do the same for the other buttons, but it's no elegant solution.
    However, since you're pretty far in the project now (considering your .FLA) I think that's the way to do it.
    I could give you another solution by putting all of the code in one single frame and verify it with variables, but I don't think that's something you need right now.

    I'm afraid it's just a matter of fiddling around with Flash, getting to know how it works exactly and work your way up from there.

    Good luck and I'm sure you'll be a Flash Master in the future (as long as you keep practising!)

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