someone please tell me what the hell is going on here, the Number type is the only one that fails here:
in a new fla add these line:
Code:
var test2:Test2 = new Test2();
var test1:Test1 = new Test1();
Test1.as
Code:
package {
public class Test1 {
protected var var1:String;
protected var var2:Number;
protected var var3:int;
protected var var4:uint;
protected var var5:Boolean;
public function Test1(){
trace("TEST 1 CONSTRUCTOR", var1, var2, var3, var4, var5);
}
}
}
Test2.as
Code:
package {
public class Test2 extends Test1 {
public function Test2(){
var1 = "hello";
var2 = 10;
var3 = 5;
var4 = 15;
var5 = true;
trace("TEST 2 CONSTRUCTOR", var1, var2, var3, var4, var5);
super();
}
}
}
traces out:
TEST 2 CONSTRUCTOR hello 10 5 15 true
TEST 1 CONSTRUCTOR hello NaN 5 15 true
TEST 1 CONSTRUCTOR null NaN 0 0 false
????????
why is Number the only one coming back as NaN. And funnily enough its the number type I need, figures.