I made a few improvements to my Zongy class. Roll your mouse over the <Button>, <Image> and <Label> here to see what it does. It is easy to use Zongy. Just check out the source code of the simple example to see what I’m talking about.
The Zongy Explorer below will help you choose which settings to pass to create your effects. While you can pass practically any value to Zongy the range that really makes sense is pretty small. For instance you can make an effect that will bog down your computer in a hurry. That’s because of the expanding bitmap and blurring/alpha that is applied.
If you really want to see something cool then roll your mouse in a circle over the buttons/icons/labels in the Explorer below. Better yet click really fast on the image of the Enterprise. Neato eh?
Here’s the basics of how to use Zongy:
1-Declare your zongyEffects as Application variables:
1
| private var _zongyOverEffect:Zongy; |
2-Instantiate your variables in the init/creationComplete handler
1
| _zongyOverEffect = new Zongy( 1.02, 1.2, 250 ); |
3-Create a callback for each varable that you can call from your components
1 2 3
| private function applyZongyOver( e:Event ):void {
_zongyOverEffect.start( e.currentTarget as UIComponent );
} |
4-Call the callback function from your component declaration
1 2 3
| <mx:Button
label="Zongy Button"
rollOver="applyZongyOver( event );" /><!--formatted--> |
That’s about all there is to it. You can poke around in the Zongy and ZongyDTO clases if you want to see what’s going on internally. It has something to do with Bitmaps, BitmapData, UIComponent, Filters, Timers and stuff like that.
If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.
