如何通过html movie参数将QueryString参数传递给Flash swf?

时间:2022-11-11 23:43:59

I have a html for render Flash swf files and this has its parameter "movie" and this "movie" value is the url of the swf.

我有一个用于渲染Flash swf文件的html,它有参数“movie”,这个“movie”值是swf的url。

And in my swf, I have a method loadXml("myXMLFile.xml") that reads a xml, get its attributes and show them in swf. So far so good...

在我的swf中,我有一个方法loadXml(“myXMLFile.xml”),它读取xml,获取其属性并在swf中显示它们。到现在为止还挺好...

But, what I'm looking for is to pass a QueryString in the movie value, such as "myMovie.swf?myFile=anotherXMLFile.xml" and makes the swf loads this querystring parameter and loads the "anotherXMLFile.xml" instead of the "myXMLFile.xml".

但是,我正在寻找的是在电影值中传递QueryString,例如“myMovie.swf?myFile = anotherXMLFile.xml”并使swf加载此querystring参数并加载“anotherXMLFile.xml”而不是“myXMLFile.xml”。

That is... I want to dynamically send to swf the XML File I want to load...

那是...我想动态发送到swf我要加载的XML文件...

Is there a way to do that??

有没有办法做到这一点??

1 个解决方案

#1


You can check out this post:

你可以查看这篇文章:

Flash: Passing Variables to Flash from HTML via Query String

Flash:通过查询字符串从HTML传递变量到Flash

If that doesn't take care of what you're looking for, you can also check out:

如果这不能满足您的需求,您还可以查看:

SwfObject

SwfObject gives you a way to load up a SWF and pass parameters to the SWF via javascript. You could access your page query string variables and pass them to the SWF that way.

SwfObject为您提供了一种加载SWF并通过javascript将参数传递给SWF的方法。您可以访问页面查询字符串变量并以这种方式将它们传递给SWF。

#1


You can check out this post:

你可以查看这篇文章:

Flash: Passing Variables to Flash from HTML via Query String

Flash:通过查询字符串从HTML传递变量到Flash

If that doesn't take care of what you're looking for, you can also check out:

如果这不能满足您的需求,您还可以查看:

SwfObject

SwfObject gives you a way to load up a SWF and pass parameters to the SWF via javascript. You could access your page query string variables and pass them to the SWF that way.

SwfObject为您提供了一种加载SWF并通过javascript将参数传递给SWF的方法。您可以访问页面查询字符串变量并以这种方式将它们传递给SWF。