在 loadComplete 之前设置 Flex 中 SWF 的 flashvars
我有一个 Flash 小程序,我想将其嵌入到 Flex 文件中,该文件会在 SWF 播放器(Immervision 的 PurePlayer)中加载全景文件 - 我使用以下代码:
<mx:SWFLoader id="mapLoader"
width="740"
height="588"
source="../bin-debug/PurePlayer.swf?flashvars='panorama=../bin-debug/untitled.ivp'" />
小程序加载正常,但不执行文件...
PurePlayer 文档使用以下变量:panorama=myPano.ivp"
如果我通过浏览器窗口加载相同的 SWF,则它可以与以下 URL 正常工作: http://localhost/pureplayer/PurePlayer.swf?panorama=untitled.ivp
I have a Flash applet which I want to embed in a Flex file this loads a panorama file inside a SWF player (Immervision's PurePlayer)- I am using the following code:
<mx:SWFLoader id="mapLoader"
width="740"
height="588"
source="../bin-debug/PurePlayer.swf?flashvars='panorama=../bin-debug/untitled.ivp'" />
The applet loads fine but it is does not execute the file...
The PurePlayer documentation uses the following var: panorama=myPano.ivp"
If I load the same SWF via a browser window it works fine with the following URL: http://localhost/pureplayer/PurePlayer.swf?panorama=untitled.ivp
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过在完整的处理程序中播放电影之后
您还可以考虑在电影完成播放后或在 Flash 应用程序中发生基于用户交互时监听事件,方法是在完整的 Flex 应用程序中添加事件处理程序播放之前的处理程序。显然,您需要知道 Flash 应用程序将调度的事件类型,但如果机器人应用程序是您的,那应该没问题。
mapLoader.content.addEventListener(“yourFlashEvent”,handleYourFlashEvent)
Have you tried playing the movie after in your complete handler
You also might also consider listening for an event once your movie has completed playing or when based user interaction takes place in your Flash app by adding adding an event handler in your Flex application in the complete handler before you play it. You obviously will need to know the type of the event the Flash App is going to dispatch but if bot applications are yours that should be no problem.
mapLoader.content.addEventListener( "yourFlashEvent", handleYourFlashEvent )
您可以在 swf 文件的 URL 中提供全景参数,而不是作为 flashvar,如下所示:
You can provide the panorama parameter in the URL to swf file, instead of as a flashvar, like this: