February 09, 2011

Spark ItemRenderer States Bug

Hi guys,
Here is something I found myself struggling with for an hour, and I thought I might spare you the time. In spark, when you wish to create a Spark Item Renderer, you typically create a new class that extends, obviously enough, the ItemRenderer class.
This is what I did, but I wanted more functionality to it, and implemented some states to that renderer. Which is trivial enough, some might say...
What happened is, that when hovering over the Item Renderer I've just created, the states started acting weird. Mainly changing to the initial state for no real reason.
This seemed to be a nice voodoo in the making, but after diving in a bit , I found out that what causing the trouble is the Super ItemRenderer Class itself.

Why?
It has many features, some are related to states (normal, hovered - rings a bell?). This states handling goes crashing into the state behavior I wanted so… now I have the cause.

Solution
The way to go in my situation is using the DataRenderer which is a simple Group based Class that only implements the IDataRenderer. That is exactly what I need, and thank you for sparing me all the extra Bytes for functionality I don't need, Adobe. next time, try and direct me into using it in the first place...

That's all, people.
Take care.

February 06, 2011

Flashmatticomponents has passed the 300 downloads!

Hi guys, back in the time, I published a bundle of components up on Google Code. Since then, over 300 developers have downloaded the package!
oh joy :)
I know that 300 is not that big of a number, but then again, it sure makes me proud.
if you don't know what I'm talking about, please visit Flashmatticomponents and check it out. all the people downloading, I hope you found the package helpful. Cheers.