dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Button to link to nextScene

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    27

    Button to link to nextScene

    HI

    I have been doing this before and it always worked easy, but seems like in Flash MX smoething has changed...

    I am refering to the actionscript in buttons.

    I have a button in a movieclip which o release should go to next scene:

    on (release) {
    nextScene();
    }


    the above code seems to work if it is in the main timeline but not in a movieclip ??

    I also have aother question:

    is it possible to link to the last scene in the movie ? as I don't want to name it or label it as I might be adding more scenes later on so I want this button to link straight to the last scene..

    thanks
    silv
    silvio galea
    svogla@di-ve.com

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    use frame labels, ie... "sc5_frame1"

    from a button in a movieclip -

    on (release) {
    _root.gotoAndPlay("sc5_frame1");
    }

  3. #3
    Junior Member
    Join Date
    Dec 2000
    Posts
    27
    Does this mean that the nextScene command is not working anymore ?

    as I would prefer not to have to lable each and every scene.

    thanks
    silv
    silvio galea
    svogla@di-ve.com

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    using frame labels is recommended practice with Flash

    you have - button in a movieclip - so nextScene()
    tries to go to next scene in the movieclip.

    try ( not tested ) -

    on(release) {
    _root.nextScene();
    }

  5. #5
    Junior Member
    Join Date
    Dec 2000
    Posts
    27
    mmm


    yes have tried that as well, but since the movie is being loaded from another movie the _root is the original movie.... mmm looks like I found a way to work with lables as am giving the whole path of movies and instead of next scene am working with play and automatically it goes to the next scene

    thanks a lot for your help and inspiration...

    just one more think... as you mentioned the next scene of a movie clip... can I make scenes into a movie clip ?? I thought scenes are something that can only be used in the main timeline :!

    silv
    silvio galea
    svogla@di-ve.com

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    // can I make scenes into a movie clip

    No, not possible.

    // loaded from another movie the _root is the original movie

    try - _parent.nextScene();

  7. #7
    Junior Member
    Join Date
    Dec 2000
    Posts
    27
    since when all this has changed because i remember using the normal mode in flash MX and without touching any script myself used to work very easily
    silvio galea
    svogla@di-ve.com

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