Who knows how to animate a 'container'?

Hi,

[INDENT]I am new to posting threads, but I have been an avid kirupa visitor for many years :slight_smile:
I figured if there is one place to find talented actionscripters it would be here!
The time is 3:21 am here in Sydney and I am barely awake and I have nowhere else to turn, so any help would be greatly appreciated (and yes I am aware that the majority of threads contain those sweet words) :slight_smile:

[/INDENT]
I am simply trying to load an image externally, with a preloader. I know enough code (or how to search well enough) to be able to create a button and a container and to have that work without any errors (wow!) :slight_smile:

What I am trying to achieve is to have the container that will load up the external JPEG be animated. For example, I have a button, and when I click on that button, an animation plays that has the container within itself. The container shows up in the last frame which has a stop(); action.

The problem is, the container only loads up the image if it is on the root of the timeline. I cannot seem to load the images into the container if it is within another movieClip.

This is the code that I have learnt to write, it is on the first frame of the root timeline:

var loader:MovieClipLoader = new MovieClipLoader();
container.createEmptyMovieClip ("container",1);

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

preload.onLoadStart = function(target){

}

preload.onLoadProgress = function (target, loadedBytes, totalBytes){
bar_anim.pb.loader_txt.text = (Math.floor((loadedBytes/totalBytes)*100)+"%");
bar_anim.pb.bar_mc._xscale = (Math.floor((loadedBytes/totalBytes)*100));
bar_anim.pb.bar_mc._alpha = (Math.floor((loadedBytes/totalBytes)*100));
}

preload.onLoadComplete = function(target){

}

This is the code that is on the button, which controls when the image is loaded into the container:

on (rollOver){
	box.highlight.gotoAndPlay(2);
}
	
on (rollOut){
	box.highlight.gotoAndPlay(12);
}
	
on (release) {
	loader.loadClip("image1.jpg", container);
	content_anim.gotoAndPlay(2);

}

I LOVE YOU ALL!