Posts Tagged ‘flash actionscript’
Flash Actionscript Preloader
Here is a good & working AS2.0 preloader sample.
Insert the code above into frame 1, add new dynamic text on scene and name its var as “showpercent”, that’s all..
onEnterFrame=function(){
var total:Number=_root.getBytesTotal();
var loaded:Number=_root.getBytesLoaded();
if(loaded==total){
delete onEnterFrame
play();
}else{
var percent:Number=Math.floor((loaded/total)*100);
showpercent.text=percent
}
}
stop();
How to delete xml cache with actionscript?
İt’s important to delete xml cache in flash if your content is renewing it self often. Here’s the sample code for deleting xml cache with actionscript;
Just change your xml loading code with this:



