AS3 stage.loadsInfo.parameters

本文介绍在AS3中如何使用stage.loadsInfo.parameters接收客户端数据。在使用Flex或CS发布Flash时,可通过HTML文件中的FlashVars参数进行变量传递。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

AS3中stage.loadsInfo.parameters用于接收从客户端获取数据。
在使用Flex,或是CS进行发布Flash时,会生成一个HTML文件,其中有这一段内容
AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "MagicCube",
"quality", "high",
"bgcolor", "#869ca7",
"name", "MagicCube",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "MagicCube",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "MagicCube",
"quality", "high",
"bgcolor", "#869ca7",
"name", "MagicCube",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
哪么如果要传变量,需要使用FlashVars进行传值。
"FlashVars", "name="+name,加入到e if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
中即可。
[url]http://www.webdesign-cn.com[/url]
[url]http://www.levs.cn[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值