PDA

View Full Version : (AS3) Circle gradient loader class



sekasi
July 13th, 2008, 12:04 PM
http://www.erikhallander.com/blog/2008/a-customizable-gradient-circle-loader-animation-for-as3.html

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:

Digitalosophy
July 13th, 2008, 01:47 PM
Very cool, thanks for sharing.

Chuckanucka
July 13th, 2008, 03:45 PM
nice! like you blog design too.

sekasi
July 13th, 2008, 08:53 PM
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.

johnlouis
July 13th, 2008, 09:00 PM
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?

Anogar
July 13th, 2008, 10:03 PM
Good solution to the issue! :)

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.

matthewjumps
July 14th, 2008, 04:13 AM
cool stuff, and lovely blog also :D

ChromeDemon
July 14th, 2008, 05:20 AM
Nice one

Dom_
July 15th, 2008, 05:00 AM
once again nice work sekasi :)

sekasi
July 17th, 2008, 06:43 PM
Anogar was quite right. Takes up a bit too much resources. Rewrote it. Fetch new version at

http://www.erikhallander.com/blog/

Thanks dude.

Anogar
July 17th, 2008, 09:53 PM
Nice rewrite! :thumb::beam: