« New APIs in AS3(JP) | Main | The Delete Operator »

Untyped Variables

All classes derive from the Object class that is known to flash programmers.

AS 2.0
In ActionScript 2.0, the lack of a type annotation meant that a variable would be of type Object.

var someObj:Object;
var someObj;

AS 3.0
In ActionScript 3.0, however, an untyped varable is not the same as a variable of type Object. An untyped variable can hold undefined, while a variable of type Object cannot hold that value.

var someObj:*;
var someObj;

Post a comment