To use data from an XML using actionscript 3 to manipulate a movieclip

DannyW

New Member
creating a clock system, need to access data from xml. The elements within the data determines the colour of he building. Need help to link the data within the xml with the object in the interface and to position them. so far i've been able to extract the data but dont know how to link those two to position them. i've only come up to this far.\[code\]import com.greensock.loading.*;import com.greensock.loading.display.*;import com.greensock.events.LoaderEvent;import flash.events.Event; import flash.net.URLLoader; var xmlLoader:URLLoader=new URLLoader();xmlLoader.addEventListener(Event.COMPLETE, loadXML);var xmlData:XMLList=new XMLList();xmlLoader.load(new URLRequest("xmldata.xml"));function loadXML(e:Event):void{ var i:int; xmlData = http://stackoverflow.com/questions/15518739/new XMLList(e.target.data); var theDots = xmlData.dots; var posx = xmlData.dots.posx; var posy = xmlData.dots.posy; for ( i=0; i<theDots.length(); i++ ) { var dot_name = theDots.name; var pos_x = theDots.posx; var pos_y = theDots.posy; var mc:MovieClip = new theDot; var pos_x:Point X = new x; var pos_y:Point Y = new y; }}\[/code\]
 
Back
Top