I’m a complete n00b on the workings of XML in AS3 (and previous versions) but here’s my scenario:
I’m creating a gauge in flash that rotates based on a value being pulled from an XML file. I have a hard coded value in the degrees field for the time being. But I want this to be a dynamic value that is pulled from an XML file. My code below:
var degrees:Number = 200;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var needleTween:Tween = new Tween(dial_mc, "rotation", Regular.easeInOut, 70, degrees, 25, false);
My XML file looks like:
<systemPerformance>
<gauge>
<overall>270</overall>
</gauge>
</systemPerformance>
So how do I take the value in the overall node (270) and convert that into a variable that I can then use inside of flash?
I’ve got the XML data coming into flash thanks to the great tutorials listed on this site. I’m now just getting hung up trying to actually parse that out into variables. Any help would be great.