[flexcoders] Should I be able to load a .fxg file as XML?

2008-12-15 Thread Mic
public var myXML:XML = new XML();
public var XML_URL:String = ../xml/FlowerPower4.fxg;
public var myXMLURL:URLRequest = new URLRequest(XML_URL);
public var myLoader:URLLoader = new URLLoader(myXMLURL);


myLoader.addEventListener(complete, xmlLoaded);

private function xmlLoaded(event:Event):void
{
   myXML = XML(myLoader.data);
   trace(Data loaded.);
}

Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
XML file? TIA,

Mic.



RE: [flexcoders] Should I be able to load a .fxg file as XML?

2008-12-15 Thread Alex Harui
What error did you get?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Mic
Sent: Monday, December 15, 2008 12:31 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Should I be able to load a .fxg file as XML?


public var myXML:XML = new XML();
public var XML_URL:String = ../xml/FlowerPower4.fxg;
public var myXMLURL:URLRequest = new URLRequest(XML_URL);
public var myLoader:URLLoader = new URLLoader(myXMLURL);

myLoader.addEventListener(complete, xmlLoaded);

private function xmlLoaded(event:Event):void
{
myXML = XML(myLoader.data);
trace(Data loaded.);
}

Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
XML file? TIA,

Mic.