Hi there
So I have this thing here that is passing xml data to the “callGauges” function.
with-in this function if I trace “gauge_1_1” I get the correct number.
What I want to do is assign that number to “public var Gauge_1_1:Number;”
And then use the var in the function guageLoaded.
The trace inside “guageLoaded” function is returning NAN
Im sure this should be simple but my as2 brain does not like it.
public var Gauge_1_1:Number;
///////////////////////////////////////////////
//////////////////////////////////////////////
public function callGauges(data:XMLList){
var gauge_list:XMLList = data;
Gauge_1_1 = new Number(gauge_1_1);
var gauge_1_1:Number = Math.floor(((Number(gauge_list))-(Number(gauge_list)))/(Number(gauge_list))*100);
}
/////////////////////////////////////////
////////////////////////////////////////
public function guageLoaded(which:Number):void{
trace(which);
var thisGuage:MovieClip;
switch(which){
case 1:
thisGuage = guage_1.content as MovieClip;
thisGuage.positionNeedles(null, Gauge_1_1, Gauge_1_2, null, 0.2);
trace("Gauge =========="+Gauge_1_1);
break;
}
}