Mac Style Wait Animation for Flash

Category Icon

Please Wait flash animation sourceSometimes you need to preload images, movies, data etc. in a flash project. There are a lot of progress indicators and what not, but the Apple progress animation is one of my favorites. For anyone that wants a very lightweight ActionScript 3 version of this animation you can download the source here.

There’s not a whole lot to it, but rather, just a for loop to cycle the opacity of the bar indicators.

var waitSteps:uint = 12;
var maxValue:uint = 100;
var minValue:uint = 10;
var startPosition:uint = 12;
this.addEventListener(Event.ENTER_FRAMEonEnterFrame);
function onEnterFrame(e:Event) {
    
for(var i:int=0i<waitStepsi++) {
        
this[“mcWP” + startPosition].alpha = (i * ((maxValue - minValue) / (waitSteps - 1))) / 100;
        
if(startPosition >= waitSteps){
            
startPosition = 1;
        } 
else {
            
startPosition++;
        }
    }
    
    
if(startPosition >= waitSteps){
        
startPosition = 1;
    } 
else {
        
startPosition++;
    }
}

Categories:
Previous entry: ActionScript Tween Fighting
Next entry: An explosion of good books

Comments

I was looking for a code like this one. Thanks for sharing it.

Posted by Dorothy @ Print Posters on 03/19 at 09:48 PM

Leave a comment

Name:
Email:
Location:
URL:
Remember my personal information
Notify me of follow-up comments?

Submit the word you see below: