//FLASH播放器
import win.ui;
/*DSG{{*/
var winform = win.form(parent=...; bottom=227;right=337;border="resizable";text="FLASH 播放器" )
winform.add( 
btnPlay={ dr=1;bottom=205;text="播放";left=27;top=178;z=2;db=1;right=115;cls="button" };
static={ dr=1;dl=1;bottom=165;text="static";left=32;dt=1;top=16;right=308;transparent=1;db=1;z=1;edge=1;cls="static" };
btnStop={ dr=1;bottom=205;text="停止";left=131;top=178;z=3;db=1;right=219;cls="button" };
btnDump={ dr=1;bottom=205;text="显示成员";left=230;top=178;z=4;db=1;right=318;cls="button" }
)
/*}}*/

//创建控件
var flash = com.CreateEmbed( {} ,winform.static,"ShockwaveFlash.ShockwaveFlash") 
var shockwave = flash._object;

callEvent ={
	OnReadyStateChange=function( newState ){
		io.print("OnReadyStateChange")
	}
	OnProgress=function( percentDone ){
		io.print(percentDone)
	}
	FSCommand=function( command ,args ){
		io.print( command , args );
	} 
}
com.Connect(shockwave, callEvent )

shockwave.Movie = "http://www.qq.com/map.swf"

winform.btnStop.oncommand = function(id,event){ 
	shockwave.stop() 
}
winform.btnPlay.oncommand = function(id,event){ 
	shockwave.play()
}
winform.btnDump.oncommand = function(id,event){
	io.open()
	com.DumpTypeInfo(shockwave)   
	io.print("按 CTRL+C 关闭此窗口")
} 

winform.show(true) 
win.loopMessage();
return winform;
