as and TypeCast
================
var obj:* = new Event();
var testObj1:Sprite = Sprite( obj ); // throw an error
var testObj2:Sprite = ( obj as Sprite ); // return null
// below 2 lines as same.
var testObj11:Event = Event( obj ); // no error, correct!
var testObj22:Event = ( obj as Event ); // no error, correct!
is and instanceof
=================
AS3: is
AS2: instanceof
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment