欢迎你访问我的个人网站:www.6ideas.cn,资料更丰富.

Flash起步(一)Flash中接收Html參數方法

Posted on 2007-04-19 16:48  talantlee  阅读(1472)  评论(1编辑  收藏  举报

就像頁面調用之間一樣,往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&param2=456" />
            <embed src="f2.swf" quality="high" bgcolor="#ffffff" width="300" height="150"

name="Flash1" FlashVars="param1=123&param2=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

Copyright © 2024 talantlee
Powered by .NET 9.0 on Kubernetes