0
通常、あなたは次のことを行うだろうURLからイメージをロードしている場合:あなたが埋め込まれた画像クラスにソースを設定している場合埋め込みイメージ/ swfのサイズを取得する方法は?
m_image = new Image();
m_image.addEventListener(Event.COMPLETE, image_completeHandler, false, 0, true);
m_image.source = "http://www.example.com/image.jpg";
private function image_completeHandler(event:Event):void
{
// Image content has now loaded, we need to wait for it to validate it's size
m_image.addEventListener(FlexEvent.UPDATE_COMPLETE, image_updateCompleteHandler, false, 0, true);
}
private function image_updateCompleteHandler(event:FlexEvent):void
{
// Do stuff with width/height
}
しかし、完全なイベントが火災に表示されません。だから私の質問は、どのように幅/埋め込み画像/ swfの高さを取得できますか?ようにすぐにそれを行うと、あなたがそのすべてのプロパティにアクセスすることができます
これは、その負荷ISNを示し、組み込み時にも同期します: http://livedocs.adobe.com/flex/3/langref/mx/core/MovieClipLoaderAsset.html#event:complete –
AFAIKでは、埋め込みアセットにMovieClipLoaderAssetを使用する必要はありません。 .. – Cay