Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

1,530 profile views

LeoJK's Achievements



  1. Hey Carl, Thanks for replying - I wanted to thank you for your tutorials and clear advice too, very much appreciated. With regards to your code can one effectively add any arbitrary "variable" properties they like when creating the imgLoader eg the "progressBar:progressBar" property in the above code? I looked in the api documentation and couldnt find any progressBar property, so I'm assuming so? I took a look at the Demo code and still working it out, thanks!
  2. Hi I'm attempting to replicate the preloader functionality of the demo for LoaderMax, Basically I'm loading multiple images to form a scrolling gallery, with each individual image having its own preloader. I've got a container with the preloader for each image, awaiting the image to load, this is so I can animate that container around whilst the image is loading and the user can see the progress bar in the mean time.. I'm just struggling to get multiple images loading simultaneously to display progress bars at the same time like in the LoaderMax demo.... any advice? var categoryName:String = "portrait"; var maxCons:Number = 2; var numImages:int = 4; var clipArray:Array = []; var imgContainer:MovieClip; var progressBar:MyProgressBar; var queue:LoaderMax = new LoaderMax({maxConnections:maxCons, onProgress:queueProgressHandler, onComplete:queueCompleteHandler, onChildProgress:imageProgressHandler, onChildComplete:imageCompleteHandler }); for (var i:int=0; i<numImages; i++) { queue.append(new ImageLoader("gallery/"+categoryName+"/pictures/" + i + ".jpg", {container:containerMC, x:650, y:0})); imgContainer = new MovieClip(); progressBar = new MyProgressBar(); // Add the preloader to the future image container, then to the array progressBar.name = "progressBar" + i.toString(); imgContainer.addChild(progressBar); imgContainer.name = "imgContainer" + i.toString(); clipArray.push(imgContainer); } queue.load(); function imageProgressHandler(event:LoaderEvent):void { /////// give each loader its own Preloader /////// ////// How to find which loaders are loading to call their respective preloaders? <<--------------------- ////// And set Priority to that loader when button clicked? clipArray(/* select Loader */).progressBar.scaleX = event.target.progress; } function handleClick(event:MouseEvent):void { // Set loading priority to clip } function imageCompleteHandler(event:LoaderEvent):void { /// add loader to container, remove the preloader /// remove the loader /// etc... } /// Other functions for loaderMax listeners Thanks for your time