While working on the video player, I wanted to show spinning loading animation while buffering, and since I decided that the whole thing will be pure code, with no library assets, I had to code this animation – just the kind of things I like.
It didn’t take long, and I decided to share it – why not?
So here it is:
What you need to do in order to use it is add two functions:
private var myAnim :LoadAnim;
public function showAnim():void
myAnim = new LoadAnim(0x333333); // animation color
myAnim.x = stage.stageWidth / 2;
myAnim.y = stage.stageHeight / 2;
public function hideAnim():void
Download the class here, enjoy : )