preloader Question
- Started
- Last post
- 4 Responses
- fixate
does anyone have a script for a preloader in flash that can set the _alpha of a movie depending on what has been loaded. eg if 50% of the movie has been loaded show a movieclip with 50% alpha.
I'm going to attempt it myself in a sec, but i thought it might save time if someone has a similar script that works.
- unfittoprint0
changeAlpha = function(){
_alpha= (this.getBytesLoaded()/this.getB...
if(this.getBytesLoaded == this.getBytesTotal()){
_alpha = 100;
clearInterval(loadLoop);
play();
}
}alphaLoop = setInterval (this, "changeAlpha", 30);
stop();
- fixate0
thanks unfitt..
not sure how to work it. as it looks different to how i want to do it.
but will see soon.
- unfittoprint0
*mistake
where u see:
clearInterval(loadLoop);write:
clearInterval(alphaLoop);
- fixate0
got it. different to how you said. but thanks for the help.
var loadAmount = _totalframes;
if (_framesloaded == loadAmount) {
gotoAndPlay("beginMovie");
} else {
loaded = Math.round(getBytesLoaded() / 1024);
total = Math.round(getBytesTotal() / 1024);
percent = Math.round((loaded/total) * 100);myMovie._alpha = percent;
gotoAndPlay("prevFrame");
}