html向swf传递参数
作者:jackgun 日期:2007-10-16
html向swf传递参数
在 as2 时,我们这样传参数:
<param name="FlashVars" value="param1=1¶m2=2" />
或
test.swf?param1=1¶m2=2
然后直接访问 _root.param1 /2 就行了。
as3 :
var param : Object = root.loaderInfo.parameters;
if(param["param1"] != null) {
param1 = param["param1"];
param2=param["param2"];
}
这样访问。
并:不要在 html 中使用 test.swf?param1=1¶m2=2 这样的方式传参数,
据说会失败,我也懒得试了 :P
[本日志由 jackgun 于 2007-10-19 06:25 PM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: html swf 传递 参数
相关日志:
文章来自: 本站原创
Tags: html swf 传递 参数
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
上一篇
下一篇
