A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: problem with jumping between scenes in flash cs3

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    3

    problem with jumping between scenes in flash cs3

    Hi there! I'm a newbie in flash.

    I have 20 scenes that belong to only one flash file. At each scene, I have a 'next' button which directs you to the next scene when it is clicked.

    Example:
    on(press){
    gotoAndPlay("Scene 6", 1);
    }

    This has already worked. However, when I do editing and exporting the flash movie a lot of times, there are times that when I hit 'next' button, it will jump to a different scene other than the scene where it is supposed to go.

    I already checked the Action for each button, and everything's correct.

    I don't know why this happens. Hope someone could help, please...
    Thanks so much!

  2. #2
    flash grasshopper
    Join Date
    Feb 2005
    Posts
    156
    Scenes aren't good to use for navigation - they're not really designed to be used in this way, and so you'll find that you end up with lots of problems when trying to navigate between them.

    What you need to do is set your .fla up in an similar way, but instead of using Scenes, use frames with labels. So your code would be, for example:

    on(press){
    gotoAndPlay("about");
    }

    Which will jump to the frame of the timeline called "about" and play from there. Also if you're new, you should perhaps take the opportunity to learn Actionscript 3 from the outset - you're a bit behind the times with your AS 1 code there.

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    3

    question

    I appreciate your suggestion. I really wish I could learn more about the latest in Flash. Unfortunately, we're given a project and it's due at the end of the month, so I don't have much time studying a lot right now.

    And yeah, thanks for the tip. But if I have a lot of scenes to be converted to frames with labels, then the number of frames will be too many. Is that ok with flash? Or are there problems if there are too many frames?

    Thanks once again

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    if iv understood this properly it wouldn't take you that long to change your project around, just click on a frame, enter a label in the properties inspector at the bottom and then copy and paste in place from your scenes onto your new frame with label and repeat

    then use the onpress code for your buttons. failing that you could always try this way that i use sometimes:

    stop();
    buttonname.onRelease = function () {
    gotoAndPlay ("scene 2" ,1)
    }


    be sure to set the instance name correctly if your going to use that
    also make sure you paste that code into the timeline, not on the object.

  5. #5
    Junior Member
    Join Date
    Feb 2010
    Posts
    3
    thanks rickibarnes and stevehungry

  6. #6
    flash grasshopper
    Join Date
    Feb 2005
    Posts
    156
    You can have as many frames as you want, this won't create any problems.

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