# (AS3) Circle gradient loader class

**URL:** <https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845>\
**Category:** open source\
**Created:** [July 13, 2008, 3:04pm UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845 "2008-07-13T15:04:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 13, 2008, 3:04pm UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/1 "2008-07-13T15:04:36Z")

</div>

[http://www.erikhallander.com/blog/2008/a-customizable-gradient-circle-loader-animation-for-as3.html](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:

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [July 13, 2008, 4:47pm UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/2 "2008-07-13T16:47:39Z")

</div>

Very cool, thanks for sharing.

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 13, 2008, 11:53pm UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/3 "2008-07-13T23:53:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![johnlouis](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnlouis/32/568_2.png) [@johnlouis](https://forum.kirupa.com/u/johnlouis)\
**Post date:** [July 14, 2008, 12:00am UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/4 "2008-07-14T00:00:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [July 14, 2008, 1:03am UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/5 "2008-07-14T01:03:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [July 14, 2008, 7:13am UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/6 "2008-07-14T07:13:42Z")

</div>

cool stuff, and lovely blog also 😃

---

<div class="post-metadata">

**Author:** ![ChromeDemon](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@ChromeDemon](https://forum.kirupa.com/u/ChromeDemon)\
**Post date:** [July 14, 2008, 8:20am UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/7 "2008-07-14T08:20:49Z")

</div>

Nice one

---

<div class="post-metadata">

**Author:** ![Dom\_1](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@Dom\_1](https://forum.kirupa.com/u/Dom_1)\
**Post date:** [July 15, 2008, 8:00am UTC](https://forum.kirupa.com/t/as3-circle-gradient-loader-class/265845/8 "2008-07-15T08:00:24Z")

</div>

once again nice work sekasi 🙂
