# Movieclip displaying an external .swf

**URL:** <https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661>\
**Category:** flash\
**Created:** [September 28, 2004, 4:25pm UTC](https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661 "2004-09-28T16:25:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chunk](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@chunk](https://forum.kirupa.com/u/chunk)\
**Post date:** [September 28, 2004, 4:25pm UTC](https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661/1 "2004-09-28T16:25:34Z")

</div>

Hello,

How could i get a normal movieclip to display external .swf

I have 3 buttens i press one and i would like the movieclip to get a file named /home.swf and every butten would load a diffrent file, how would i go around doing this ?

---

<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:** [September 28, 2004, 5:02pm UTC](https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661/2 "2004-09-28T17:02:04Z")

</div>

What’s the instance name of the movie clip that you want to load the .swf’s into? And is it on the root timeline or inside another movie clip?

---

<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:** [September 29, 2004, 9:09am UTC](https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661/3 "2004-09-29T09:09:32Z")

</div>

```auto
path.to.movieclip.loadMovie("movie.swf");

```

it wil replace the movieclip. If you want to load it into that movieclip, you’ll first need to create an empty mc:

```auto
path.to.movieclip.createEmptyMovieClip("container_mc",0);
path.to.movieclip.container_mc.loadMovie("movie.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:** [September 29, 2004, 3:10pm UTC](https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661/4 "2004-09-29T15:10:50Z")

</div>

[left]path.to.movieclip.createEmptyMovieClip(“container\_mc”,0);  
path.to.movieclip.container\_mc.loadMovie(“movie.swf”);[/left]  
[left] [/left]  
[left]so if my movieclip was named “hello” the code will be:[/left]  
[left] [/left]  
[left][left]hello.createEmptyMovieClip(“container\_mc”,0);  
hello.container\_mc.loadMovie(“movie.swf”);[/left]  
[left] [/left]  
[left] [/left]  
[/left]

---

<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:** [September 29, 2004, 3:15pm UTC](https://forum.kirupa.com/t/movieclip-displaying-an-external-swf/65661/5 "2004-09-29T15:15:53Z")

</div>

yeah… it would insert swf-file movie.swf into the movieclip hello as if it was a normal internal movieclip named container\_mc…
