【发布时间】:2011-09-12 15:25:41
【问题描述】:
我目前正在做一个必须是多语言的项目。我需要能够使用 Flash Var 来定位 XML 文件。
任何想法为什么下面的代码不起作用?
这是我的 AS3 代码:
var xmlPath:String;
xmlPath = root.loaderInfo.parameters(encodeURIComponent["xmlPath"]);
这是我的 HTML 代码:
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="195" height="160">
<param name="movie" value="../../../desktop.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="FlashVars" value="xmlPath=привет/mp3.xml" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
<param name="expressinstall" value="../../../expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../../../desktop.swf" width="195" height="160">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="FlashVars" value="xmlPath=привет/mp3.xml" />
<param name="expressinstall" value="../../../expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
【问题讨论】:
标签: html flash actionscript-3