# Loading external swf

**URL:** <https://forum.kirupa.com/t/loading-external-swf/57636>\
**Category:** Uncategorized\
**Created:** [July 14, 2004, 9:43pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636 "2004-07-14T21:43:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![geestring](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@geestring](https://forum.kirupa.com/u/geestring)\
**Post date:** [July 14, 2004, 9:43pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/1 "2004-07-14T21:43:24Z")

</div>

so i want a portfolio viewer. i have a scroll menu to choose image. When you choose an image, an external swf will load in a little image window. with a description of the work… And at thebottom of this external swf i want a “view” option which allows the user to view the image full screen or at least the full size of the movie stage. But since this “view” button is in the external swf, how do load the full image on the main swf?

---

<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:** [July 14, 2004, 10:01pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/2 "2004-07-14T22:01:52Z")

</div>

[AS] **\_root**.InstaceName.loadMovie(file.swf);[/AS]I’m not really sure that this will work. It depends on what script you’re using.

---

<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:** [July 14, 2004, 10:04pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/3 "2004-07-14T22:04:41Z")

</div>

i dont have any real script right now. all i want to do is load a swf into another swf from another swf. if that makes any sense?

---

<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:** [July 14, 2004, 10:06pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/4 "2004-07-14T22:06:44Z")

</div>

This should make more sense of the script and what you’re trying to do. :thumb:  
[http://www.kirupa.com/developer/mx/full\_site.htm](http://www.kirupa.com/developer/mx/full_site.htm)

---

<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:** [July 15, 2004, 4:17pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/5 "2004-07-15T16:17:34Z")

</div>

i dont think that tutorial represents what i want to do. since their buttons are in the same swf as where they want to load the swf. Anyone have any ideas?

---

<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:** [July 16, 2004, 3:09am UTC](https://forum.kirupa.com/t/loading-external-swf/57636/6 "2004-07-16T03:09:44Z")

</div>

Well maybe its not necessary i can just make it in the same swf. just more messy…

---

<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:** [July 17, 2004, 5:12pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/7 "2004-07-17T17:12:02Z")

</div>

Well maybe its not necessary i can just make it in the same swf. just more messy…

---

<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:** [July 17, 2004, 5:23pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/8 "2004-07-17T17:23:24Z")

</div>

Ok, so you load a small swf into your main, and you want a button in this loaded swf to have a button that once clicked it loads a bigger version of the loaded swf into the main one?..are you using loadMovie or loadMovieNum?

---

<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:** [July 17, 2004, 6:46pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/9 "2004-07-17T18:46:37Z")

</div>

thats my question, i dont how to do this. i know how to load a movie into a swf. but not from another swf.

---

<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:** [July 17, 2004, 6:48pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/10 "2004-07-17T18:48:37Z")

</div>

It’s exactly the same. Say you have two container clips in your main movie, MC1 and MC2. You load a swf into MC1 using:

\_root.MC1.loadMovie(“whatever.swf”)

in whatever.swf you have a button that you want to use to load a different swf into the main movie container MC2, you use:

\_root.MC2.loadMovie(“whatever2.swf”)

Is this what you mean?

Adam

---

<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:** [July 17, 2004, 7:06pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/11 "2004-07-17T19:06:55Z")

</div>

but whatever.swf contains the button. and wants to load whatever2.swf in the swf where everything is contained.So whatever.swf is in main.swf and a button in whatever.swf wants to load whatever2.swf in main.swf

---

<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:** [July 17, 2004, 7:09pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/12 "2004-07-17T19:09:30Z")

</div>

Yep, and the way I posted above is the way to do that…

To make sure, you’re not loading whatever2.swf into whatever.swf, right? Just loading it into the main movie, am I reading you right? If so, the above solution is what you need.

---

<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:** [July 17, 2004, 8:13pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/13 "2004-07-17T20:13:23Z")

</div>

so the the button in whatever.swf will know that theres a “MC2” in main.swf?  
\_root.MC2.loadMovie(“whatever2.swf”)

---

<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:** [July 17, 2004, 8:59pm UTC](https://forum.kirupa.com/t/loading-external-swf/57636/14 "2004-07-17T20:59:32Z")

</div>

Yeah, as long as you put it there, it will look in the \_root for it and find it and then load the next swf into it.
