Loading specific frame of external .swf into main movie

how to load frame label “one” of external.swf into main movie.

buton.onPress = function () { loadMovie("external.swf…???


loadMovie("yourfile.swf", "_root.mc");

That should load the move then allow then tell it to go to the label one

[AS]myButton_btn.onPress = function() {
And put this code on the frame actions of external.swf:

thansk for the help, i will give them a try

hey kax is this a typo, .swf?label


I never seen ? inside actionscript

If you tested the code, you’d know if it’s a typo or not.

For the record:

No, it is not a typo.

thanks kax for clearing my assumption
it works very nicely


I didwork once but now It doesn’t ???

I have attached the two movies I’m testing the code in.
I’m trrying to load frame “one” of external.swf movie with the loadMovie action (provided by Meridian), and then another frame of the same movie by using the onPress action with a button (provided by Kax).
Please take a look at it and let me know what I’m doing wrong.

You’re not referencing the MovieClip correctly, you have holderOne.mc and it should be holderOne_mc.

ok I fix it with some outside help
here is the good working fla.(attch) for someone else to use it and learn


Will kax’s version work on the desktop/CD, I was having problems with his example, but my code could have been off a little.

gepo’s second example worked, but I did not want to load the movie first and then choose a frame, I wanted to choose a frame while loading the movie.

Nope, it will only work when viewed in a browser.

However, you can define a variable holding the frame label:
[AS]myButton_btn.onPress = function() {
label = “myLabel”;
In the frame actions of external.swf:
You might have addressing problems depending on how you set up the movie. To prevent this issue, you could simply define the frame variable in the global object:
[AS]_global.label = “myLabel”;
// frame actions of external.swf
I think there are a couple of threads about this, a little search wouldn’t hurt. :wink:

that did the trick, thanks!..

btw I did do a search, but I guess my search options, did not satisfy the great search engine god.

You’re welcome. :stuck_out_tongue: