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
2010-06-18 10:25:28
Yeah , i did it and is getting the dimensions correctly, using LoaderInfo. Thanks buddy.
Wind Chimez
2010-06-18 10:31:47
+1
A:
You can use the loader class. once the image is loaded in the object, use loaderInfo for gettign the image properties.
NH884
2010-06-19 07:57:44