0

Hay, i have a flash movie which loads a static XML file, the script for this looks like

list = "list.xml";
var listXml:XML = new XML();
listXml.ignoreWhite = true;
listXml.load(list);

I want to be able to change this 'list' variable dynamically, perhaps using flashVars.

like this

 var flashvars = {
    xmlpath: "list.xml"
};

Any idea's how to go about doing this?

dotty
  • 40,405
  • 66
  • 150
  • 195

2 Answers2

2

http://www.actionscript.org/forums/showthread.php3?t=185370

AS3 Pass FlashVars to loaded swf

if you have some code already, please share, so we could advice you

Community
  • 1
  • 1
Eugene
  • 2,226
  • 1
  • 14
  • 15
0

The flashvars properties are accessible in the parameters property of the LoaderInfo object.

In your main class:

var info:Object = this.loader.contentLoaderInfo.parameters;
var xmlpath:String = info.xmlpath;

Check this article: http://blogs.adobe.com/pdehaan/2006/07/using_flashvars_with_actionscr.html

PatrickS
  • 9,539
  • 2
  • 27
  • 31