Flex与Flashvars通讯

Flex与Flashvars通讯

这里我使用swfobject加载swf

<script type=”text/javascript” src=”swfobject.js”></script>
<script type=”text/javascript”>
 var flashvars =
 {
      testId: “jt0001″,
      edit: “1″
    };
  swfobject.embedSWF(”pro.swf”, “con1″, “100%”, “100%”, “10.0.0″, “expressInstall.swf”,flashvars);
</script>
<body scroll=”no”>
 <div id=”con1″></div>
</body>

在Flex中取得Flashvars中设置值:

var testid=this.loaderInfo.parameters["testId"];
var edit=this.loaderInfo.parameters["edit"];

posted on 2009-09-28 17:03  jiahuafu  阅读(578)  评论(0编辑  收藏  举报

导航