Can someone tell me how i can change the .xml file that a flash movie loads using c#. ie: i would like an ActionScript variable that defines the location of the flash movie. I would like to be able to change this variable using c# if possible.

i dont really know how it would look, but something like:

<object xmlpath='" + myCSharpVar + "'" ...></object>

I just starting this, but my ultimate goal is to create a .swf movie that can load an xml file that specifies images, etc. However i want to use the same .swf file in multiple places and only have to change a ref to what xml file it uses - and my Flash/ActionScript skills are very rusty.

To clear it up a bit, in AS you can do something like:

loader.load( new URLRequest("IWantThisNameDynamic.xml") );

how can i define that xml file in my c# code?

Question author Schmoopy | Source



I'm quite sure you cannot "create" your own attributes for the object tag. At least not without consulting with the w3c ;-)

Passing values to flash is done via the "flashvar"-param:

  <object ...>
    <param name="flashvars" value="&xmlpath=<path to xml>"/>

In the flash-movie you can now access the path to your xml via the "xmlpath"-variable.

Answer author Argelbargel

Ask about this question here!