0 Replies - 2388 Views - Last Post: 02 October 2012 - 10:22 PM

#1 donhoward  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-October 12

create preloader that loads in time rather than bytes

Posted 02 October 2012 - 10:22 PM

I'm trying to create a preloader that will load in time rather than bytes. I would like for people to see the preloader working without having content to load. I am new to actionscript so I don't know how to convert this to a timer. I have looked at many posts and not found anything that fits this. It seems like this would be a fairly common use script.

Thank you in advance!

Don

Here is the code I am using as a preloader:


this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onloading);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);

function onloading(evt:ProgressEvent):void {
	var loaded:Number = evt.bytesLoaded / evt.bytesTotal; 
	percent_txt.text = (loaded*100).toFixed(0) + "%";
	
	var counter= (loaded*100)*3.6;
	masked_mc.mask=masking_mc;
	masked_mc.rotation=counter;
	trace(masked_mc.rotation);
	if(masked_mc.rotation<0) (masked_mc.mask=null)
};

function onComplete(event:Event):void { 
	this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onloading);
	this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
	gotoAndPlay(2); 
};




Is This A Good Question/Topic? 0
  • +

Page 1 of 1