Im creating a news section for my project where i have a swf in which ill load xml text (news…ie site updates) is it possible to have a preloader there ? or it loads reeally fast and no need for it ?
mx.transitions.OnEnterFrameBeacon.init();
var x:XML = new XML();
x.ignoreWhite = true;
x.load("some.xml");
MovieClip.addListener(x);
x.onEnterFrame = function():Void {
//ratio between bytes loaded and total bytes of the XML file
var perunus:Number = this.getBytesLoaded() / this.getBytesTotal();
};
x.onLoad = function(success:Boolean):Void {
if (success) {
delete this.onEnterFrame;
//code for if XML loads properly
} else {
//code for if XML does not load
}
};