简体   繁体   中英

How do I get the width and height of an image?

I'm constructing a book of sorts in Actionscript 3 (FlexBuilder) and am trying to size an image dynamically according to the dimensions of it's source file. But, I've found that if I don't explicitly state the width and height of an image, they trace as 0.

So that I can scale down an image to fit within a given space, how do I get the width and height of a source image?

flash.display.Loader具有width和height属性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM