i have two objects [object MovieClip] [object ContentDisplay] i have to differentiate them abut i can't find a me开发者_运维问答thod in as3 check variable type, like in php have is_int...
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 */}
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
精彩评论