Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

playing a MOVIE CLIP inside a different SCENE???

Status
Not open for further replies.

nivosh

MIS
May 8, 2000
38
0
0
IL
hi ya all...
let's say i have 3 scenes in a movie. inside scene number one i have a movie clip named "menu".
i need an action script for a button located in scene 3 who will play a specific frame inside that movie clip "menu" from scene 1.

thanks for the help.
long live flash.
only good things
nivosh


nivosh
nivosh@hotmail.com
 
Hi Nivosh,

Simply label the targeted frame with a unique label and use the following:
on (press){
_root.menuinstance'sname.gotoAndStop("label");
}

Regards,
wink4.gif
ldnewbie
 
thenks for the reply men, but when i put the command in the movie
an error appears:"String literal was not properly terminated
_root.maininstance'sname.gotoAndStop("menu");"

do you know the reason for it?
also are you sure that it will work from a different scene?

thanks
nivosh
nivosh
nivosh@hotmail.com
 
Nivosh,
You have to give your menu clip an instance name. Select the clip on stage, and in the Instance panel, name it menu1 or whatever, but then use that name when you're referring to that clip.
So you would replace my "menuinstance'sname" with the instance name of your clip:
_root.menu1.gotoAndStop("label");

This will target your menu clip from every where! On top of that, if you want to go to a specific frame in that clip, you have to label (without the "") the targeted frame (in the Frame panel, give it a name), and then use your label as I have used "label". In other words, in the actionscript above, replace label with the name you gave to that frame, and this time, enclose it with "", as I've done!

Regards,
wink4.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top