views:

232

answers:

1

Hi,

I am trying to use BitmapImage spark class instead of mx image class. Image loads the same, fine

<s:BitmapImage  id="img" source="sample.jpg">

</s:BitmapImage>

But I have an issue with adding mouse events on it, eg:

img.addEventListener(MouseEvent.CLICK,clicked);

do not trigger any mouse events when clicking on the image

Help! Thanks

A: 

I found a solution, handling the events through the Graphic class ...

<s:Graphic id="img">


        <s:BitmapImage   source="media/paxRomana005_150dpi.jpg">

        </s:BitmapImage>
</s:Graphic>

Who can light me ...? Thanks

tit