Nobien A nerd blog about nerdy things by … nerdy guys?

28Mar/084

AS3 BufferingIndicator Class

Out of boredom the other day I wrote this class to create a simple animated buffering indicator, you know...the ones we always see everywhere that look like a pinwheel. Here's an example of what you can do with it:

Here's the code that generated this example:

var bi:BufferingIndicator = new BufferingIndicator();
bi.x = 40
bi.y = 45
this.addChild( bi );

bi = new BufferingIndicator( 50, 20, 7, 20, 0xCC0000, 6, 0.2, 25 );
bi.x = 130;
bi.y = 65;
this.addChild( bi );

bi = new BufferingIndicator( 75, 40, 8, 25, 0x0000FF, 10, 0.2, 100 );
bi.x = 270;
bi.y = 90;
this.addChild( bi );

And here's where you can download the class file: BufferingIndicator.as

Comments (4) Trackbacks (0)
  1. Very nice. I think I may extend it so you can pass in a custom class/object for the “ticker” blades.

  2. Nice one, thanks. It flickers a bit on Safari on a Mac.

  3. Sounds like you need a new browser.


Leave a comment

(required)

No trackbacks yet.