简体   繁体   English

将变量从AS3 SWF传递到AS2 SWF

[英]Pass variables from AS3 swf to AS2 swf

I am trying to load an AS2 swf from an AS3 swf. 我正在尝试从AS3 SWF加载AS2 SWF。 The AS2 swf which was written long back, expects parameters from the timeline(_root). 很久以前写的AS2 SWF需要时间轴(_root)中的参数。 These were passed to it before from HTML using flashvars. 这些是以前使用flashvars从HTML传递给它的。

Now I am trying to get rid of the HTML pages, by directly loading the AS2 swf from the AS3 swf. 现在,我试图通过直接从AS3 SWF加载AS2 SWF来摆脱HTML页面。 However, when I try to load the AS2 swf using the Loader class, the swf loads fine, but the parameters are not getting passed on. 但是,当我尝试使用Loader类加载AS2 SWF时,SWF可以很好地加载,但不会传递参数。

I tried to add the query string to the url parameter I used in the URL request used for the Loader, but that did not work.(Adding URL variables as data to URLRequest did not work either.)Is there any way that I can do this? 我试图将查询字符串添加到用于Loader的URL请求中使用的url参数中,但这不起作用(将URL变量作为数据添加到URLRequest也不起作用)我有什么办法可以做这个?

Thanks 谢谢

您是否尝试过Loader.contentLoaderInfo.parameters

Taken from the AVM1Movie docs: 取自AVM1Movie文档:

...no interoperability (such as calling methods or using parameters) 
between the AVM1Movie object and AVM2 objects is allowed.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM