hallo leute,
ich habe folgenden AS in meinem flash-preloader (vor einem bild mit kleiner animation - preloader nicht von mir) den ich als header in meiner einfacher html seite verwenden möchte. doch nachdem ich die erste seite betreten habe und das flash geladen wurde durch den preloader, möche ich, dass das flash nicht nochmal lädt da das swf ja eigentlich im webbrowser cache liegen müsste:
PHP-Code:
stop();
// Function for fading out objects
function fadeOut(){
// Reduce opacity
this._alpha-=10;
// Check to see if the clip has been faded out all the way, if so remove the script
if(this._alpha<=0){
// Set opacity all the way down
this._alpha=0;
// Set the visible to false
this._visible=false;
// Play next frame
play();
// Kill the enterframe script
this.onEnterFrame=null;
}
}
// Start the preloading
this.onEnterFrame=function(){
// Variable for how much is downloaded
dataLoaded=this.getBytesLoaded();
// Variable for the total file size
totalData=this.getBytesTotal();
// Variable that calculates the percentage downloaded
percentData=Math.round(100/totalData*dataLoaded);
// Animate the preloader. The preloader clip itself it 100px wide
preloader_mc.gotoAndPlay(percentData);
// Update the text field with the percentage downloaded
preloader_mc.percent1_mc.percent_txt.text=percentData+"%";
preloader_mc.percent2_mc.percent_txt.text=percentData+"%";
// Check to see if the movie is downloaded
if(percentData>=100){
// Play to the next frame
preloader_mc.gotoAndStop(100);
// Fade out the preloader and the text field
preloader_mc.onEnterFrame=fadeOut;
// Get rid of this enterframe script
this.onEnterFrame=null;
}
}
wisst ihr was ich meine? wenn das flash einmal auf der ersten seite geladen wurde, soll es ohne den preloader auf der zweiten seite mit gleichem flash erscheinen, was muss ich also in meinem code ändern, damit das nicht mehr passiert?
hoffentlich könnt ihr mir weiterhelfen...
cheers, MD.