# Load jpg into mc in mc thats masked

**URL:** https://forum.kirupa.com/t/load-jpg-into-mc-in-mc-thats-masked/316253
**Category:** Uncategorized
**Created:** [November 17, 2010, 2:31am UTC](https://forum.kirupa.com/t/load-jpg-into-mc-in-mc-thats-masked/316253 "2010-11-17T02:31:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scarce](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@scarce](https://forum.kirupa.com/u/scarce)
#### Post date: [November 17, 2010, 2:31am UTC](https://forum.kirupa.com/t/load-jpg-into-mc-in-mc-thats-masked/316253/1 "2010-11-17T02:31:56Z")

</div>

I’m working on a site for a client right now and the only thing I have left on it, is loading jpg’s into the swf so they can browse items.

I have code and it somewhat works I guess. It loads, but doesn’t show until I click another option, then it shows for a split second before the mc is moved off stage, then it returns blank.

I have this code on the main timeline not in any functions:

```auto

function startLoading(whichImage)
{
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.loadClip(whichImage,"theScroll.imageScroll");

    var preload:Object = new Object();
    loader.addListener(preload);

    preload.onLoadStart = function(target)
    {
        trace("Started Loading");
    };

    preload.onLoadProgress = function(target, loadedBytes, totalBytes)
    {
        trace(Math.floor((loadedBytes / totalBytes) * 100) + "%");
    };

    preload.onLoadComplete = function(target)
    {
        trace("Finished Loading!");
    };

}

```

then I call it with this from this.onEnterFrame() function:

```auto

_root.onEnterFrame = function(){
if (images == "bars")
    {

        startLoading("barMain1.jpg");
        

    }
}

```

Note:there’s more to the code as an entirety but this just deals with loading the jpg into the source.

images = “bars” whenever you click on the link “bars”

it’s not showing once it hits the frame thats supposed to show it. but when I click on (e.g: cabinets) it’s shows the image a split second then it shows the cabinets part. This is driving me insane and I need this before I can go to the next part where images load into a loaded swf…please help me, i’ve searched online everywhere and nothing solves my issue.

I dunno if I can post the fla, it’s like 43 megs

here’s the site:

[http://www.mysticimpression04yahoo.com/](http://www.mysticimpression04yahoo.com/)

(dont ask about the url, they messed up when they set it up)

here’s the cs3 version…the actual version is cs5:

> **[indexCS3.zipx](http://www.mediafire.com/file/exffk8n6c2waw10/indexCS3.zipx)**
>
> MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

i have 2 of the images I wanna load in the zipx file
