views:

93

answers:

1

Say I have an flash object embedded in XHTML like so...

<object width="600" height="400">
<param name="movie" value="somefilename.swf">
<param name="data" value="somefilename.xml">
<embed src="somefilename.swf" width="600" height="400">
</embed>
</object>

I know that there are methods to read, parse, and use the data in "somfilename.xml". But, in my case the XHTML and the XML are generated dynamically. I would rather generate both in one step.

So if I embed the XML like this...

<object width="600" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="600" height="400">
<data>
<something id="0" whatever="foo bar"/>
<something id="1" whatever="uff da"/>
<something id="2" whatever="1ee7"/>
</data>
</embed>
</object>

Can I get to the "/data/something/@whatever" from within my flash app?

A: 

No. Flash will not have direct access to the tag.

Flash does have access to flashvars though. So might be able to encode your xml as a string and put that in flashvars.

Using flashvars

But it may be easier just to try loading the XML file as Flash runs. Perhaps check to see when the file gets generated and then load it?

CookieOfFortune
Too bad, seems that this would be useful.
dacracot