-
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?
-
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");
-
Registered User
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");
-
Ummmmmm! Wouldn't thought of that!
Posted at the same time I guess!
-
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...
-
Registered User
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
-
Thank you
I had a feeling it was going to require a variable. now to try...
thanks
-
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.
-
Registered User
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
-
Senior Member
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. -
-
got it! finally. thanks a lot. maybe one day i'll...
-
The Flash file from cancerinform doesn't seem to be working on my computer. Does anyone have a good copy of it?
-
Senior Member
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. -
-
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.
-
Senior Member
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. -
-
It's still sending an error report. The swf file is just a blank white screen.
-
Senior Member
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. -
-
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.
-
Senior Member
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. -
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|