If you're loading the image dynamically, you may need to wait until the complete event handler before you can access the image's dimensions.
Thank you for your fast answer.
When I wait until the creation is complete and afterwards i am trying to get the width parameters with EVENT.COMPLETE handler then i get the same value of 0.
Or do i something wrong?
Could somebody post me an example???
Use following code, may be this is what you are looking for:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
private function onImageLoadHandler(event:Event):void
var bmp:Bitmap = event.target.content as Bitmap;
trace("Height :: " + bmp.height);
trace("Width :: " + bmp.width)
<mx:Image source="image.png" complete="onImageLoadHandler(event)">
Vikash, it was the solution.
After I have read your codesnippet, I've found that the event.targent.contentWidth does the same