A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: movieclips and/or scenes in succession

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Location
    where freedom rings...
    Posts
    18

    movieclips and/or scenes in succession

    Using Flash MX, is it possible to have a button play a movie clip then go to a scene?

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well you can play a mc from a button, then on the last frame of your movie clip (probably with a stop action) you would direct the main timeline to another scene.
    But you can't use scene names from a mc. You'll have to label the first frame of the scene you are targeting with a unique label such as start_scene3 and target that labeled frame in the last frame of your movie clip:

    _root.gotoAndPlay("start_scene3");

  3. #3
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    you click a button to play a movie, and then when the movie finishes playing, you want to start playing a scene?

    supposing the movieClip is called myMc and is on the stage
    Code:
    on(release){
     _root.myMc.play();
    assign a frame labbel to the first frame of the scene you want to play; e.g. myScene
    in the last frame of the the movieClip:
    Code:
    _root.gotoAndPlay("myScene");

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ummmmmm! Wouldn't thought of that!
    Posted at the same time I guess!

  5. #5
    Junior Member
    Join Date
    Jan 2003
    Location
    where freedom rings...
    Posts
    18

    clarity

    further explanation... multiple menu buttons on click all play same MC then goto seperate scene per button. possible in MX? thanks for your help...

  6. #6
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    yes...
    when I finished writting... yours was there...

    yes, it is possible
    one way is using variables
    each button, when pressed, sends a different variable to the movieClip

    for example, in button1:
    Code:
    on(release){
     _root.myMc.play();
     _root.myMc.myVariable="myScene1";
    }
    button2:
    Code:
    on(release){
     _root.myMc.play();
     _root.myMc.myVariable="myScene2";
    }
    and so on

    in the last frame of the movieClip:
    Code:
    _root.gotoAndPlay("myVariable");
    and myScene1, myScene2, ... are the labels of the first frames of each different scene you want to play

  7. #7
    Junior Member
    Join Date
    Jan 2003
    Location
    where freedom rings...
    Posts
    18

    Thank you

    I had a feeling it was going to require a variable. now to try...
    thanks

  8. #8
    Junior Member
    Join Date
    Jan 2003
    Location
    where freedom rings...
    Posts
    18

    wont work...

    alas...
    nothing going.

    on button click i get nothing.

    here is my button code...


    on(release){
    _root.movie.play();
    _root.movie.myVariable="Scene 2";
    }


    and the code in the last frame of my MC...


    _root.gotoAndPlay("myVariable");


    nothing going.

    here is the output...


    Scene=Scene 1, Layer=Layer 1, Frame=2: Line 2: ';' expected
    _root.Symbol 2.play(1);

    Scene=Scene 1, Layer=Layer 1, Frame=2: Line 3: ';' expected
    _root.Symbol 2.myVariable="Scene1";


    grrr
    Last edited by just[dick]; 01-14-2003 at 10:42 PM.

  9. #9
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    I can't see any errors...
    or did you write:
    _root.Symbol 2.play(1);
    _root.Symbol 2.myVariable="Scene1";
    ?
    is should be
    _root.Symbol2.play(1);
    _root.Symbol2.myVariable="Scene1";
    ...

    don't use spaces when assigning instance names

  10. #10
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    The script is different. here is a fla I made. I didn't use scenes I used frames but that should not make any difference.
    - The right of the People to create Flash movies shall not be infringed. -

  11. #11
    Junior Member
    Join Date
    Jan 2003
    Location
    where freedom rings...
    Posts
    18
    got it! finally. thanks a lot. maybe one day i'll...

  12. #12
    Junior Member
    Join Date
    Jan 2003
    Location
    Ottawa
    Posts
    12
    The Flash file from cancerinform doesn't seem to be working on my computer. Does anyone have a good copy of it?

  13. #13
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    I have a mac and some pc guys had problems with my files. Go to my site http://can_info_guide.tripod.com/ and send me your e-mail address. I will send you different compressed versions if nobody else has a solution.

    But what is the problem?
    - The right of the People to create Flash movies shall not be infringed. -

  14. #14
    Junior Member
    Join Date
    Jan 2003
    Location
    Ottawa
    Posts
    12

    the problem

    I have the same problem as just[dick].

    or did you mean the problem with the Flash file? Every time I open it an error report shows up, and the program exits.

  15. #15
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    I don't get any error messages and it works fine. I have included the file again with swf.
    - The right of the People to create Flash movies shall not be infringed. -

  16. #16
    Junior Member
    Join Date
    Jan 2003
    Location
    Ottawa
    Posts
    12
    It's still sending an error report. The swf file is just a blank white screen.

  17. #17
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    As I said before, I have a mac, that may be the prblem. Give me your e-mails and I send you sit files but I can't promise it works.
    - The right of the People to create Flash movies shall not be infringed. -

  18. #18
    Junior Member
    Join Date
    Jan 2003
    Location
    where freedom rings...
    Posts
    18

    file problems

    im on a pc and the file worked fine for me, the only problem i had was that mozilla wanted to download the file as differentfla.zip.php , but once i got it, it worked just fine.

  19. #19
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    In a mac IE wants to download all files as attachment.php. #{&* the producer of pcs
    - The right of the People to create Flash movies shall not be infringed. -

  20. #20
    Junior Member
    Join Date
    Jan 2003
    Location
    Ottawa
    Posts
    12

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