Skip to content

The FlexWiz Blog

Notes on Flex, AIR and Game Development

Archive

Category: Code

I needed a simple spark button with only an icon – basically a bitmap made into a button. The problem is that I have lots of these buttons, each with a different icon – and all the skin samples use hard-coded assets.

Well, the old Button class used to have an icon style (it was called skin or upSkin) so I decided to bring back the icon style so I’d be able to reuse the same skin and pass a different icon to each instance.
continue reading…

  • Share/Bookmark

There are many components out there to use in a game for displaying score. But can any of them do the job in 15 lines or less?

The following code makes use of a tweener. Tweeners are extremely powerful, and  typically used to move objects, but can do so much more. The first thing to know about a tweener is that you can tween anything, including custom properties.
continue reading…

  • Share/Bookmark