Tuesday, April 13, 2010

Week 9 [4/13/10]

Stokes on the mask doesn't count as anything

Lack of updates due to massive coding, can't really be capture through screen capture.

var _myURL:String="myWebsite.swf";
var _myLoader:Loader="new Loader();
var _myURLRequest:URLRequest = new URLRequest(_myURL);
myLoader.load(_myURLRequest);
//
_myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
_myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, doProgress);
//
function doProgress(e:ProgressEvent):void
{
var percent:Number=(e.bytesLoaded/e.bytesTotal) * 100;
this.loadBar_mc.gotoAndStop(percent);
trace(percent);
}
//
function swfLoaded(e.Event):void
{
trace("LOADED!");
this.removeChild(loadBar_mc);
loadBar_mc=null;
//
this.addChild(_myLoader);
}

No comments:

Post a Comment