Skip to content

The FlexWiz Blog

Notes on Flex, AIR and Game Development

Archive

Category: Quick Tips

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

Heres a useful tip on using the mx utils package.

Occasionally we need to trace values of objects, whether these are flash display objects or your own classes and VOs.   Simply outputting an object to trace will generate an output like [Object Object] without any useful info about the contents of the object.
continue reading…

  • Share/Bookmark

I have been using the Flex 4 SDK for a while now, since the Beta 2 release, and had a few projects containing mxml code with spark components. Since then Adobe has made some changes, and I found that in order to use few of the new components I need to upgrade.

One of the best references I use is  Tour de Flex and it is now based on a newer build, so I decided to grab the latest stable build from Adobe – that is build 13875. After installing it on my Flash builder – not to my surprise – I found that my projects shows build errors in any mxml that has spark and halo components, and the compiler refuses to recognize the mx namespace.
continue reading…

  • Share/Bookmark

Making a flex button appear flat or transparent does not require any skinning – there are plenty of style options, and all we need to do is find the right setting.
This may sound trivial, since we can make any display object clickable – but since I find myself spending way too much time on this, its time to put this issue to rest.

The Flex framework button class (mx.Button) has a default skin – the halo button skin. I needed a button with no background or highlight – basically a clickable text. Simply setting the background alpha to zero seem to have no effect.
continue reading…

  • Share/Bookmark