Skip to main content
Participant
April 23, 2006
Answered

Jump To Frame and Play in Separate Movie

  • April 23, 2006
  • 3 replies
  • 260 views
I have two completely separate .swf files being loaded into a web page. MovieA.swf is set to play on load and movieB.swf is set to be stopped on load.

On the click of a button within movieA, I'm trying to get movieA.swf to tell movieB.swf to go to a certain frame and play.

I've been searching on Google for hours now and not really found anything that works.

Within movieA I've tried the following:

on (release) {
gotoAndPlay("_root.movieB", "15");
}

OR

on (release) {
gotoAndPlay("movieB", "15");
}

When I do this it just seems to play movieA. Note I also haven't found a way to "name" a movie. So I'm just calling the file name (movieA.swf) and I realize that's probably not right.

It seems like it would be a common thing to do... anyone have any code that might work?

Thank you,
Raym




This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Newsgroup_User

"raymbarr" <webforumsuser@macromedia.com> wrote in message news:e2ehgu$b09$1@forums.macromedia.com...
>I have two completely separate .swf files being loaded into a web page.
> MovieA.swf is set to play on load and movieB.swf is set to be stopped on load.
>
> On the click of a button within movieA, I'm trying to get movieA.swf to tell
> movieB.swf to go to a certain frame and play.

If they are separate on the web page (not one loaded by the other) then you cannot use code in one to refer to the other except
through a linkup code called localConnection.
There are some examples of localConnection on my website..

http://members.cox.net/4my2dogs/flash/
tralfaz


3 replies

Newsgroup_UserCorrect answer
Inspiring
April 23, 2006

"raymbarr" <webforumsuser@macromedia.com> wrote in message news:e2ehgu$b09$1@forums.macromedia.com...
>I have two completely separate .swf files being loaded into a web page.
> MovieA.swf is set to play on load and movieB.swf is set to be stopped on load.
>
> On the click of a button within movieA, I'm trying to get movieA.swf to tell
> movieB.swf to go to a certain frame and play.

If they are separate on the web page (not one loaded by the other) then you cannot use code in one to refer to the other except
through a linkup code called localConnection.
There are some examples of localConnection on my website..

http://members.cox.net/4my2dogs/flash/
tralfaz


raymbarrAuthor
Participant
April 23, 2006
Awesome! That worked! Thank you so much.
http://www.imagineave.com/web/index-3d.html
(click the first or second picture - I haven't hooked up the rest yet). Basically the bottom movie tells the top movie (which starts off transparent) to go to a frame and play).

I've been trying to get that for hours! Whooohooo!

One thing I noticed - you're using

on (release) {
sendFrameNumber(2);
}

Is there a way to try "sendFrameLabel("slide1");

so that you can refer to frame labels rather than frame numbers in case I later move things around in the movie?

That's so great! I'm thrilled. Thanks!
Raym