I am trying to load pictures into my scrollPane and thus make thumbnails of them. I have simple set up, a scrollPane instance name “myScrollPane”, a movieclip with a Loader control in it, the Loader instance name is myLoader, and the movieClip instance name is mc_container.
Now I have been successful in adding the movieClip to myScrollPane, but I don’t know how to loop through it. I tried something like this, but no images show up, the first movieClip seems doubled up and the scroll bars aren’t working.The scrollpane looks like this(see attachment).
Does anyone have any ideas.
var myScrollPane:mx.containers.ScrollPane;
myScrollPane.contentPath = 'mc_container';
//
MyPicVars = new LoadVars();
MyPicVars.load("jetPlane.txt");
MyPicVars.onLoad = function(success) {
if (success) {
//trace("loaded");
var t_mc:MovieClip;
Rc = this["Rc"];
//trace(Rc);
for (i=0; i<=Rc-1; i++) {
t_mc = myScrollPane.content.attachMovie("mc_container", "mc"+i, i, this.getNextHighestDepth());
t_mc._x = 5;
t_mc._y = 5+(i*80);
myScrollPane.content.myLoader.contentPath = "jetPlane/"+this["pic"+i];
t_mc.i = i;
t_mc.location = this["pic"+i];
}
} else {
trace("not loaded");
}
}