Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

dnbly

Members
  • Posts

    2
  • Joined

  • Last visited

dnbly's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Thanks so much. I can't believe I missed that! Just need to figure out a method to update the rotation of the seperate rings based on each childs load progress (i.e. ring1 only rotates as child1 loads, ring2 only updates as child2 loads etc). UPDATE: Success! I have a fully working ring preloader that tracks the seperate array children loading. Thanks for everything LoaderMax and Carl!
  2. Hi all, I am very new to loadermax and fairly inexperienced with AS3 so apologise if I have missed or misunderstood some documentation that explains this. I am currently using SWFLoader to load 3 external swfs into a main swf. I have constructed a preloader in this main swf that 'draws' a ring using masking. The ring currently tracks the load progress of the whole queue (see code below) however I want it to track the load progress of Atoms.swf. The ultimate aim is to repeat this for the other array assets. //Load external SWFs into queue LoaderMax.activate([SWFLoader]); var urls:Array = ["Atoms.swf","Compounds.swf","Quiz.swf"]; var queue:LoaderMax = LoaderMax.parse(urls); var swfs:Array = queue.content; queue.load(); queue.addEventListener(ProgressEvent.PROGRESS, onLoading); function onLoading(event:LoaderEvent):void { //set variables to calculate ring rotation var loaded1:Number = event.target.progress; var counter1=(loaded1*100)*3.6; //mask one semi-ring over the other masked1_mc.mask=masking1_mc; masked1_mc.rotation=counter1; if(masked1_mc.rotation<0){ masked1_mc.mask=null } My reasoning tells me that the event.target.progress needs to be changed to track the asset loading however I am unsure what code (if any) would accomplish this. I have considered just hard-coding a ratio of queue progress to swf size for each asset but would really prefer something a bit more dynamic (so I don't need to change it when I update the external swfs in future). I realise that this may not be the best implementation of loadermax however it currently works and I would prefer not to change it unless necessary. Sorry if this seems a bit long winded, I would really appreciate a speedy response for some enlightenment in this matter. Thanks for LoaderMax, the whole of GreenSock and helpful responses.
×