我有以下声明:
[Embed(source="i/6.png")]
private var img6 : Class;
答案 0 :(得分:1)
您只能在实例化时确定嵌入图像的大小。类似的东西:
<s:BitmapImage source="{img6}" complete="completeHandler(event)" />
…
private function completeHandler(event:Event):void
{
var image:BitmapImage = BitmapImage(event.currentTarget);
trace (image.sourceWidth);
trace (image.sourceHeight);
}