# Loading via MovieClipLoader to ScrollPane

**URL:** <https://forum.kirupa.com/t/loading-via-moviecliploader-to-scrollpane/112025>\
**Category:** Uncategorized\
**Created:** [June 2, 2004, 7:25pm UTC](https://forum.kirupa.com/t/loading-via-moviecliploader-to-scrollpane/112025 "2004-06-02T19:25:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simpleSoft](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@simpleSoft](https://forum.kirupa.com/u/simpleSoft)\
**Post date:** [June 2, 2004, 7:25pm UTC](https://forum.kirupa.com/t/loading-via-moviecliploader-to-scrollpane/112025/1 "2004-06-02T19:25:28Z")

</div>

I want to use the movieClipLoader class to load a JPG into the scrollPane component…  
I can get the picture to load via the movieClipLoader class and I can even get it to load on top of the scrollPane but not into the scroll pane any suggestions…

here is the code…

```auto

var viewImageListner:Object = new Object();
viewImageListner["owner"] = this;
var viewImage:MovieClipLoader = new MovieClipLoader();
viewImage["owner"] = this;
viewImageListner.onLoadError = function() {
 //throwError("Problem locating plug-in. Check location or path. "+loc, "Plug-In Error");
};
viewImageListner.onLoadInit = function() {
 trace("Pic has been initalized.");
};
viewImageListner.onLoadStart = function() {
 trace("Started.");
};
viewImageListner.onLoadProgress = function(target, loaded, total) {
 trace(loaded+" "+total);
};
viewImageListner.onLoadComplete = function() {
 trace("Pic has been loaded.");
 trace("The name of this is: "+this.owner._name);
};
viewImage.addListener(viewImageListner);
 
function loadImage(s:String):Void {
 //s is a path to the location of the JPG
 //imagePreview.contentPath = "container";
 //var c = imagePreview.content;
 // Function to actually attach the clip to scrollpane
 viewImage.loadClip(s, imagePreview.content);
}

```

My main end goal is to do a progress bar while it loads the JPG to the component so if you know of a better way of achieving the same affect i am all ears!
