How do I get the FlashVars values in ActionScript 2.0?
I need to dynamically send flashvars value from <object>/<embed>
for example "<object name="flashvars" value="test=myxml.xml">
to my swf file.
And in my AS I have this:
var xmlPath:String = _level0.test;
doc.load(xmlPath);
So, this way I want to read multiple XML files (at least that's my intention!). But nothing I do is working ...
I have also tried
doc.load(_root.test)
but it didn't work either.
If I do this:
doc.load("someXML.xml")
It works great !!
I've been trying to solve this for hours and still haven't found a solution!
Thanks in advance!
a source to share
I think the problem is with your HTML markup:
For a tag, <object>
you need to use the param tag in it, for example
<object ...>
<param name="FlashVars" value="test=myxml.xml">
</object>
For a tag, <embed>
its tag attribute is
<embed FlashVars="test=myxml.xml" ...>
Here's Adobe TechNote on using FlashVars that can help you.
a source to share