# Loading external jpgs into mc instances

**URL:** <https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603>\
**Category:** Uncategorized\
**Created:** [July 24, 2003, 5:05pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603 "2003-07-24T17:05:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![longhorn14](https://avatars.discourse-cdn.com/v4/letter/l/eada6e/32.png) [@longhorn14](https://forum.kirupa.com/u/longhorn14)\
**Post date:** [July 24, 2003, 5:05pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/1 "2003-07-24T17:05:04Z")

</div>

I have no problem loading an external jpg into the main timeline, but I cannot figure out how to do it properly in a movieclip.  
Here is what I am trying (with a mc instance of “clipper”).

[AS]  
\_root.clipper.loadMovie(“companylogo.jpg”);  
\_root.clipper.\_x = 100;  
\_root.clipper.\_y = 100;  
\_root.clipper.\_xscale = 50;  
\_root.clipper.\_yscale = 50;

```auto

I have this code on a frame within "clipper".
Thanks,
nat
```

---

<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 24, 2003, 5:16pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/2 "2003-07-24T17:16:33Z")

</div>

Probably the instance name of the MovieClip is wrong?

However, since you mentioned that the code is on a frame of the MovieClip, instead of \_root.clipper you could use **this**. 😉  
[AS]this.loadMovie(“companylogo.jpg”);  
this.\_x = 100;  
this.\_y = 100;  
this.\_xscale = 50;  
this.\_yscale = 50;[/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:** [July 24, 2003, 5:24pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/3 "2003-07-24T17:24:49Z")

</div>

Thanks, but I am having some trouble. (thanks for the **THIS** tip.

The image loads, but there is nothing else on the screen. It is almost like Flash trashed everything else in that clip. I wanted it to appear with some other elements on the page, but it replaces everything!  
thanks.  
nat\<:}

---

<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 24, 2003, 5:35pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/4 "2003-07-24T17:35:29Z")

</div>

Are those elements inside the same MovieClip?

When you load an SWF/JPEG, everything in that MovieClip or level will be replaced by the SWF/JPEG. :-\

Create a MovieClip and load the JPEG into it…  
[AS]this.createEmptyMovieClip(“container”, 0);  
container.loadMovie(“companylogo.jpg”);  
container.\_x = 100;  
container.\_y = 100;  
container.\_xscale = 50;  
container.\_yscale = 50;[/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:** [July 24, 2003, 5:36pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/5 "2003-07-24T17:36:21Z")

</div>

I haven’t really used loadMovie but I thought you needed to add a level to load the new movie clip into otherwise it would overwrite what was at the root of your destination.

Try something like…

this.loadMovie(“companylogo.jpg”,1);

HTH  
Liz

---

<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 24, 2003, 5:41pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/6 "2003-07-24T17:41:36Z")

</div>

PERFECT! Thanks!

---

<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 24, 2003, 5:42pm UTC](https://forum.kirupa.com/t/loading-external-jpgs-into-mc-instances/26603/7 "2003-07-24T17:42:17Z")

</div>

You’re welcome. =)
