preloader su un solo frame:
codice:this.stop(); createXML = function() { this.mioXML = new XML(); this.mioXML.load("file.xml"); this.onEnterFrame = xmlPreloader; }; xmlPreloader = function() { var car = this.mioXML.getBytesLoaded(); var tot = this.mioXML.getBytesTotal(); if(car == tot){ delete this.onEnterFrame; this.play(); } }; moviePreloader = function() { var car = this.getBytesLoaded(); var tot = this.getBytesTotal(); if(car == tot){ this.onEnterFrame = undefined; this.createXML(); } }; this.onEnterFrame = moviePreloader;

Rispondi quotando