View Full Version : A button in one swf causing a movie clip in another swf to play?
EBagg
01-18-2006, 07:54 PM
I currently have one swf referenced in another. One the main one I want a button to have a gotoAndPlay action that causes a movie clip in the other SWF to play a different frame. Anyone know how to accomplish this?
Flash Gordon
01-18-2006, 07:56 PM
check out "local connections".
Welcome to ASorg
If the swf is loaded into the main swf..then its just matter of pathing it. For example _root.OneMovie.TwoMovie.gotoAndPlay()...
EBagg
01-18-2006, 08:10 PM
Here's what I have right now...
_root.MainTemplate.gotoAndPlay("MainTemplate.swf", bob, 3)
What is "bob" and I'm assuming 3 is the frame you want to play. Is this loaded into the main swf?
EBagg
01-18-2006, 08:39 PM
bob is a movie clip in the load .swf, 3 is the frame of bob that I want to play.
_root.bob.gotoAndPlay(3); should work, assuming the structure is correct. What code did you use to load the swf?
EBagg
01-18-2006, 10:05 PM
I made a movie clip, and inside is only this code:
loadMovie("MainTemplate.swf", this);
Then it would be _root.TheNameOfMovie.gotoAndPlay();
replacing TheNameOfMovie with the instance name you gave to that movie.
EBagg
01-18-2006, 11:18 PM
Right now I have this on the main timeline:
loadMovie("MainTemplate.swf",1);
And this on the button:
_root.bob.gotoAndPlay(3);
but that doesn't seem to work....
loadMovie("MainTemplate.swf",1);
the movie that is being loaded into has what instance name?
EBagg
01-18-2006, 11:36 PM
None...it's just actionscript on a frame...should I give the frame it's on a instance name?
Its always best to loadmovie into an empty movieclip...easier to control...cause then you just refer to it by the name of the empty movieclip.
EBagg
01-18-2006, 11:56 PM
Alright yea I have a empty movie clip with the actionscript in there, the movieclip's instance name is "maintemplate".
so the actionscript I have for the button is:
_root.maintemplate.bob.gotoAndPlay(3);
...still not working..:(
Now where is bob coming from..based on what you've said the path should be
_root.maintemplate.gotoAndPlay(3);
EBagg
01-19-2006, 12:20 AM
bob is a movie clip in the loaded .swf, I want to goto frame 3 of bob
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.