Uber-customizable Flex "Loading Spinner" Component
Posted by Joe Rinehart at 3:02 PM
5 comments - Categories:
Flex
I love loading spinners. I'm not sure why. Sometimes, when something locks up with a spinner going, I won't even notice.
In Flex apps, I've used one by "jake," but I had a few issues with it:
- It only spun a simple line.
- It was explicit (you had to tell it to start and stop) instead of allowing its "playing" state to be bound.
I was restless the other night, so I put together my own version, featuring the following:
- It'll take most DisplayObject instances as a "template" for what to repeat, so you can obnoxiously repeat and fade a Panel if you really want to.
- It allows the "playing" state to be bound.
- You can set (and change on the fly) the effect to apply to each repeated instance to any Effect instance.
In its simple, stock form, it's just a spinner:
However, spinning something else (like a Button) with custom effects can be entertaining:
It's not perfect (the stock "tick" for the spinner doesn't use CSS, etc.), but how much more overengineered could a loading spinner get?
Try it out and play with the parameters (view source enabled). Use at your own peril.
Rin wrote on 11/15/07 4:05 PM
Awesome :-) Keep up the good work