Reputation: 19318
i have two objects [object MovieClip] [object ContentDisplay] i have to differentiate them abut i can't find a method in as3 check variable type, like in php have is_int...
Upvotes: 3
Views: 2820
Reputation: 39466
A similar strategy to is_int()
would be to use the is
keyword like this:
var mc:MovieClip = new MovieClip();
trace(mc is MovieClip); // true
trace(mc is String); // false
Upvotes: 3
Reputation: 1996
getQualifiedClassName(obj);
returns class name of given object
You can also check if object is for example a movieclip: if (obj is MovieClip) {/* do something */}
Upvotes: 8