| view source |
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:
private var _zongyOverEffect:Zongy;
2-Instantiate your variables in the init/creationComplete handler
_zongyOverEffect = new Zongy( 1.02, 1.2, 250 );
3-Create a callback for each varable that you can call from your components
private function applyZongyOver( e:Event ):void {
_zongyOverEffect.start( e.currentTarget as UIComponent );
}
4-Call the callback function from your component declaration
<mx:Button
label="Zongy Button"
rollOver="applyZongyOver( event );" />
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.





Great, i like it !
That's pretty slick. What's the backgound on the name? Does the name come from somewhere? Is that what's it's called inthe iPHone developers circles?
@gally, thanks. I learned a lot while developing it. I've forgotten it all now but I did learn something. :)
@todd, the background on the name is, ummm, well I just sort of pulled it out of my rear exaust port. I like finding odd names for things. I have videoMaru, PXP2, Zion, Zongy, etc. I drives Sim Bateman nuts! :)
And Zongy doesn't have anything to do with the iPhone. In fact, neither do I. I hate Apple with the burning passion of a billion white hot stars! Maybe more in fact. I'll go back to pen-and-paper before I touch anything Apple. I just wanted to be clear on the matter. :)
Its an Excellent work man.. The world is going to change if there are more people like you…..
@BIju, wow. Thanks for the compliment. I'm looking forward to doing a lot more work like this in the near future. Stay tuned! :)
Great classes. It seems to be targeted at Flex, but was easily "converted" to a Flash (cs3) compatible class.
Also a cool addition you should make: blendmodes.
I have used blendMode = "add" on the effect and i results in a "flash" (light) effect =)
@Knalle, You converted it to work with CS3? Cool work. If you blog about it let me know and I'll link over to it.
Good idea on the blend modes. I'll experiment with that myself.