<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.SWFLoader;
private var loader:SWFLoader;
private function init():void
{
loader=new SWFLoader();
loader.source="comload.swf"
this.addChild(loader);
loader.visible=true;
loader.x=100;
loader.y=100;
}
private function clickHandle(e:Event):void
{
myImg.addEventListener(Event.COMPLETE,completeHandle);
myImg.source="http://www.siyuroom.com/album/myCamera/20091212185738.jpg";
}
private function completeHandle(e:Event):void
{
loader.visible=false;
}
]]>
</mx:Script>
<mx:Image id="myImg" x="0" y="0" width="593" height="399" creationComplete="clickHandle(event)"/>
</mx:Application>