My AS3 project is devided in to 4 sections.
1.) load XML file directed from php site and store all data to miltidimensional array:thumb:
2.) load mc from library to stage and scroll it with mouse move :thumb:
3.) load pictures into previous scrolling mc on calculated coordinates :hurt:
4.) add event listener to every loaded pic to open new site :hurt:
here is part of code that’s bugging me:
var polica_mc:libMc = new libMc;
var container_mc:MovieClip;
if (xmlLoaded == true) {
polica_mc.x = -340;
polica_mc.y = -22.5;
addChild(polica_mc);
createContainer();
callThumbs();
}
function createContainer():void{
container_mc = new MovieClip();
container_mc.x = 0;//calculated coordinate X
container_mc.y = 0;//calculated coordinate Y
polica_mc.addChild(container_mc);
}
function callThumbs():void{
for (var i:Number = 0; i < my_total; i++){
var thumb_url = knjige*[3];
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
}
}
function thumbLoaded(e:Event):void{
var my_thumb:Loader = Loader(e.target.loader);
container_mc.addChild(my_thumb);
}
Problem is that pictures are not loaded into polica_mc (scrolling mc) but outside. Any suggestions?
TNX all