Add a click event to a BitmapImage in Adobe Flex/AIR

You may have noticed MouseEvent.Click is not an event available to be set on the BitmapImage Spark primitive(in the current Flex SDK). But, there is a simple workaround for this. All you have to do is place it inside of a Graphic primitive wrapper. In MXML it would look like this:


Flex Builder Project

In AS3 it looks like this:


Flex Builder Project

Leave a Reply

Your email address will not be published. Required fields are marked *