views:

23

answers:

2

Can i get the height of an image from its url info in Actionscript 3. I have the image url. I want to draw the image in my UI and i want to set the height of the drawing area dynamically upon getting the image. ?

+1  A: 

You can read the height/width of an image only after loading it to your SWF. Load the image using a Loader instance, cast the loader.content to Image, read the height and width of its bitmapData.

Amarghosh
Yeah , i did it and is getting the dimensions correctly, using LoaderInfo. Thanks buddy.
Wind Chimez
+1  A: 

You can use the loader class. once the image is loaded in the object, use loaderInfo for gettign the image properties.

NH884