I would like to know how to access a XMLList object in main timeline from movieclips.
Can XML be accessed through 2nd level(nested movieclips)?
In frame 1 of main timeline, the XML file has been loaded.
var xmlData:XML = new XML();
var data:XMLList;
xmlData.ignoreWhite = true;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest(“example.xml”));
xmlLoader.addEventListener(Event.COMPLETE, loadXML);
function loadXML(e:Event):void
{
xmlData = new XML(e.target.data);
[COLOR=red]data[/COLOR] = xmlData.children();
}
Inside a movieclip, in frame 1, how to refer to [COLOR=red]data(xmlList object)[/COLOR] in main timeline and pass it to a new XMLList inside the movieclip?
================================================== ==
var titleChildren:XMLList = [COLOR=red]data[/COLOR].title.(@name == “D5”).children();
.
.
.
I tried using the following in the movieclip but to no avail.
var data2:XMLList= new XMLList();
data2=parent.data;
and
var data2:XMLList= new XMLList();
data2=root.data;
Any help would be appreciated. Thanks!