2

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.

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...

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".

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

Is there a way to do that??


You can check out this post:

Flash: Passing Variables to Flash from HTML via Query String

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.

4

1 回答 1

2

你可以看看这个帖子:

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

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

对象

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

于 2009-05-22T04:09:20.407 回答