(AS3) Circle gradient loader class


Thanks to Krilnon for the idea and the AS2 it’s loosely based on.

If you download and / or use it, it’d be cool if you left a comment on the blog, thanks! :beer2:

Very cool, thanks for sharing.

Thanks! :beer2:

Updated it so that if you click on the circle it changes direction. Noticed it was counter-clockwise by default which felt a bit weird.

cool… saw this on digg (i don’t have a digg account though, i just look around). i was always curious how this was made. is it a bunch of circles with different alphas?

Good solution to the issue! :slight_smile:

I think one more step that might be nice to take is using bitmapData to store an image of the loader after creation, destroy the circles, and then just rotate the bitmap around. It isn’t a huge drain to rotate 140 vector objects, but it’s exponentially more than is completely necessary, and it might be noticeable if a lot of other stuff was going on.

Storing a static reference to the bitmap object would be a great way to keep this sort of thing dynamic but still very flexible.

edit: Oh, and by the way, a giant circle with a tiny radius (slider 3 all the way to the left, slider 2 all the way to the right) produces a buggy but very nearly awesome effect.

cool stuff, and lovely blog also :smiley:

Nice one

once again nice work sekasi :slight_smile: