# Loading specific frame of external .swf into main movie

**URL:** <https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495>\
**Category:** Uncategorized\
**Created:** [August 3, 2003, 5:11am UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495 "2003-08-03T05:11:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![gepo](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@gepo](https://forum.kirupa.com/u/gepo)\
**Post date:** [August 3, 2003, 5:11am UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/1 "2003-08-03T05:11:01Z")

</div>

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

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

thanks  
gepo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 5:54am UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/2 "2003-08-03T05:54:37Z")

</div>

```auto

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

```

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 6:05am UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/3 "2003-08-03T06:05:19Z")

</div>

[AS]myButton\_btn.onPress = function() {  
myMovieClip\_mc.loadMovie(“external.swf?label=one”);  
};[/AS]  
And put this code on the frame actions of external.swf:  
[AS]this.gotoAndPlay(label);[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 6:36am UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/4 "2003-08-03T06:36:57Z")

</div>

thansk for the help, i will give them a try

hey kax is this a typo, .swf?label

…(“external.swf?label=one”)

I never seen ? inside actionscript  
thanks  
gepo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 3:34pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/5 "2003-08-03T15:34:03Z")

</div>

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

For the record:

No, it is **not** a typo.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 7:06pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/6 "2003-08-03T19:06:32Z")

</div>

thanks kax for clearing my assumption  
it works very nicely

gepo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 8:04pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/7 "2003-08-03T20:04:25Z")

</div>

OOOPPPSSSSSS  
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.  
THANK YOU  
gepo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 8:26pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/8 "2003-08-03T20:26:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2003, 6:16am UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/9 "2003-08-04T06:16:06Z")

</div>

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

gepo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2003, 7:11pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/10 "2003-08-04T19:11:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2003, 7:37pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/11 "2003-08-04T19:37:08Z")

</div>

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”;  
myMovieClip\_mc.loadMovie(“external.swf”);  
};[/AS]  
In the frame actions of external.swf:  
[AS]this.gotoAndPlay(\_parent.label);[/As]  
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  
this.gotoAndPlay(label);[/AS]  
I think there are a couple of threads about this, a little search wouldn’t hurt. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2003, 8:02pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/12 "2003-08-04T20:02:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2003, 8:13pm UTC](https://forum.kirupa.com/t/loading-specific-frame-of-external-swf-into-main-movie/27495/13 "2003-08-04T20:13:32Z")

</div>

You’re welcome. 😛
