PDA

View Full Version : Play movie clip



Zackman
July 8th, 2005, 05:30 PM
Well for some reason my flash messed up, And now i need to know how to make it play a movie clip upon the release of a button. Is it possible to make it play one movie clip then play another one right after it?

mathew.er
July 8th, 2005, 05:53 PM
play movie clip after pressing a button?
put on your button:

on(release) {
//just play
yourMc.play()
//start on a specific frame
yourMc.gotoAndPlay(5);
}

if you want to play one movie clip right after another
put this action on a frame when you want that second movie clip to play:

yourOtherMc.play()

thats it
hope it helps. there are ofcource many other ways but this should do it.

Zackman
July 8th, 2005, 05:55 PM
Well with the button, It is one 1 frame and i need it all to happenon that one frame

mathew.er
July 8th, 2005, 08:18 PM
that yourMc is a path to any timeline you want. it could be root or a movie clip

Zackman
July 9th, 2005, 01:44 PM
... But how can i get 2 to play with one click on a button in only 1 frame?

mathew.er
July 9th, 2005, 04:50 PM
... But how can i get 2 to play with one click on a button in only 1 frame?
well, i dont exactly get what you are trying to say. you want to play two movie clips with one click?

Zackman
July 9th, 2005, 06:29 PM
Yes, Like you click, One plays, Then the next one plays, All in the same frame

mathew.er
July 9th, 2005, 06:42 PM
yes, as i told you. you have a on release event on a button with a play() function. this plays your movie clip. this movie clip has its own timeline. on the last frame of this movie clip you have to add a keyframe and trigger another action to play your second movie clip

Zackman
July 9th, 2005, 07:42 PM
Hmmm... It didnt work, Here is the code:

on(release) {
Symbol 1.play()
Symbol 1.gotoAndPlay(1);
}

The movie clip, As you can see, Is called "Symbol 1"

mathew.er
July 9th, 2005, 08:04 PM
Hmmm... It didnt work, Here is the code:

on(release) {
Symbol 1.play()
Symbol 1.gotoAndPlay(1);
}

The movie clip, As you can see, Is called "Symbol 1"
im not realy sure, if you can have a space in an instance name. actualy im pretty sure you cant. also is "symbol 1" name or instance name? name is used only in library and to sort your objects. instance name is used to access movie clips and buttons from actionsript.

and you dont need to use play() and gotoAndPlay() functions at one time, allways only one of them. the difference between them is that play() starts to play from a current frame and gotoAndPlay sends the playhead to a specific frame.

NiñoScript
July 9th, 2005, 08:14 PM
if i understood what u wanted, use something like this
on(release) {
Symbol_1.play(); //note that there is no space in the name? its filled with an "_"
Symbol_2.play();
}

Zackman
July 10th, 2005, 12:50 AM
Well here it is now:

on(release) {
Hero.play();
Minidevil.play();
}

But it still wont work