-
removing temporary cache files using flash
Hi Friends,
I am using Flash CS3. Now i am using this code.....
var intervalID:Number;
this.createEmptyMovieClip("myMovie",this.getNextHi ghestDepth());
this.createEmptyMovieClip("progressMovie",this.get NextHighestDepth());
progressMovie._x = 60;
progressMovie._y = 120;
progressMovie.createTextField("percentDoneLabel",p rogressMovie.getNextHighestDepth(),40,0,100,20);
myMovie.loadMovie("http://www.nathanderksen.com/book/trailer.swf");
intervalID = setInterval(monitorProgress, 100);
function monitorProgress():Void {
var percentDone:Number;
myMovie.stop();
myMovie._visible = false;
if (myMovie.getBytesLoaded()>0) {
percentDone = myMovie.getBytesLoaded()/myMovie.getBytesTotal()*100;
showProgress(percentDone);
trace("percentDone: "+percentDone);
if (myMovie.getBytesTotal() == myMovie.getBytesLoaded()) {
clearInterval(intervalID);
myMovie.play();
myMovie._visible = true;
progressMovie._visible = false;
trace("Content has finished loading.");
}
}
}
function showProgress(percentDone:Number):Void {
var barWidth:Number = percentDone;
progressMovie.percentDoneLabel.text = String(Math.ceil(percentDone))+" %";
progressMovie.clear();
// Draw a border
progressMovie.moveTo(0,20);
progressMovie.lineStyle(1,0x666666);
progressMovie.lineTo(100,20);
progressMovie.lineTo(100,30);
progressMovie.lineTo(0,30);
progressMovie.lineTo(0,20);
// Draw the bar
progressMovie.moveTo(0,20);
progressMovie.beginFill(0xCCCCCC,100);
progressMovie.lineTo(barWidth,20);
progressMovie.lineTo(barWidth,30);
progressMovie.lineTo(0,30);
progressMovie.lineTo(0,20);
progressMovie.endFill();
}
now what my problem is, first time using this script successfully its running, and showing preloader text. But another time using this script (press Ctrl + Enter) that time cache files are running, so the preloader text doesnt showing not properly. So how can i remove the cache files using flash.....
regards,
Vijayan M
Last edited by vjn_23; 11-10-2009 at 08:52 AM.
-
FK'n_dog
force the server to send a fresh file by appending a timestamp -
PHP Code:
myMovie.loadMovie("http://www.nathanderksen.com/book/trailer.swf?timestamp="+new Date().getTime());
Flash cannot clear your cache for obvious security reasons
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|