# Loading External SWF from External SWF onto an Empty MC on Main Timeline?

**URL:** <https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947>\
**Category:** flash\
**Created:** [May 15, 2003, 1:16am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947 "2003-05-15T01:16:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![macgirl](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@macgirl](https://forum.kirupa.com/u/macgirl)\
**Post date:** [May 15, 2003, 1:16am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/1 "2003-05-15T01:16:11Z")

</div>

Hi Everyone,

Please bear with me while I explain. I have an external swf that loads into a frame in the main timeline, into an empty MC. I can do this just fine. Once this clip is loaded, I have a button in this clip that loads another external swf into a different empty MC on the main timeline. I’m using loadMovie, and I need to load these movies into specific empty MCs. In other words,

I have the following:

MainStage: frame 5, contains empty MC “ClipA”; frame 6, contains empty MC “ClipB”  
External swf: “Movie1”  
External swf: “Movie2”

“Movie1” goes into “ClipA” of frame 5 on Main Timeline; and “Movie1” has a button that loads “Movie2” into “ClipB” of frame 6 on Main Timeline. I need help loading “Clip B” into “Movie2” from a button in “ClipA.”

I’m sorry my message is so roundabout - it’s not really a complicated situation, but explaining it makes it seem so.

Thank you in advance for any help - I’m assuming it’s some sort of \_root or \_parent issue things I’m not quite understanding.

Thanks!  
macgirl

---

<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:** [May 15, 2003, 1:55am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/2 "2003-05-15T01:55:05Z")

</div>

Wow that was confusing, but lets see if I can say this right.

\_root brings you back to the main timeline… and when used in an external movie, it brings you back to the main timeline of the main movie.

So if your clip is contained in the main movie that you are loading to you would use…

[AS]\_root.clipInstanceName.loadMovie(“movieToLoad.swf”)[/AS]

\_root brings you to the main (first) timeline.

\_parent brings you back 1 timeline. (So if you were inside a movie clip symbol on the main stage and used an action on that timeline that said \_parent.whatever it would effect something on the main timeline because the main timeline is 1 timeline back)

---

<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:** [May 15, 2003, 2:18am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/3 "2003-05-15T02:18:11Z")

</div>

Hi, thank you for your response and explanation. I tried it, but it didn’t work; I just got a blank, unloaded stage. To load the second external swf into the Main timeline, I have something like this on the button in the 1st loaded swf :

on (release) {  
\_root.gotoAndStop(4); \<-- I need to go to this frame in the main timeline  
\_root.nameofbuttonI’mpressingNow.loadMovie(“SecondSwf.swf”, “emptyMCName”);  
}

Does that make sense? I don’t know why I can’t explain in clearer, I’m sorry!

Thanks in advance, again,  
macgirl

---

<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:** [May 15, 2003, 4:50am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/4 "2003-05-15T04:50:25Z")

</div>

You execute the loadMovie() code wrong…

[AS]\_root.nameofbuttonI’mpressingNow.loadMovie(“SecondSwf.swf”, “emptyMCName”);[/AS]

Should be  
[AS]\_root.clipYourAreLoadingTheMovieTo.loadMovie(“movieToLoad.swf”);[/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:** [May 15, 2003, 6:07am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/5 "2003-05-15T06:07:02Z")

</div>

Oh! Thank you so much, I’ll give it a try.

Thanks!  
macgirl

---

<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:** [May 15, 2003, 6:42am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/6 "2003-05-15T06:42:45Z")

</div>

Hi again,

I tried the above, and it didn’t work - it went to the frame I needed to on the main time line, but it didn’t load the swf. Luckily, I figured out a different way to remedy this situation, but now I have to load an external swf into an empty clip in an empty MC in an externally loaded swf (into the main timeline) - it’s not too different from before, now I need to load into not the main MC but an externally loaded one. Does this make sense?

Sorry for the mess, and I really appreciate everyone’s help!

Thanks in advance,  
macgirl

---

<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:** [May 15, 2003, 6:56am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/7 "2003-05-15T06:56:51Z")

</div>

Well I don’t see how the code I supplied didn’t work, unless the clip doesn’t exist while calling the code therefore it does not work. That is all I can think of, but then again it is 3am.

And the same thing goes with this new situation… even though you completely lost me with the whole mc in an external movie to the main movie to the loaded movie in another external movie dealie thing you went through… its all targeting.

\_root takes you back to the first timeline.

Then you find your clip that contains whatever loaded movie so that gives you… \_root.clipThatContainsTheLoadedMovie then if it is a clip inside that loaded movie it becomes \_root.clipThatContainsTheLoadedMovie.clipInsideLoadedMovie and so forth and so on.

---

<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:** [May 16, 2003, 3:34am UTC](https://forum.kirupa.com/t/loading-external-swf-from-external-swf-onto-an-empty-mc-on-main-timeline/20947/8 "2003-05-16T03:34:36Z")

</div>

Thank you, everyone, for your help!

I’ll keep at it - you guys gave me very valuable fundamental things I’m missing.

Thanks again!
