就像頁面調用之間一樣,往flash中用以下方式傳遞字串
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,
0,0" width="300" height="150" id="Flash1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="f2.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="param1=123¶m2=456" />
<embed src="f2.swf" quality="high" bgcolor="#ffffff" width="300" height="150"
name="Flash1" FlashVars="param1=123¶m2=456" swLiveConnect="true" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
在flash中 ,選中 “圖層1”,在ActionScript直接用這樣的方法就可以接收了
txtInput.text=param1
txtMemo.text=param2