Question

I'm traversing the children of an SWF loaded using flash.display.Loader, in an AS-only project under FlashDevelop.

Calling flash.utils.getQualifiedClassName(obj) on the object returns "mx.core::UITextField" and while it is a subclass of flash.text.TextField, Calling (obj is flash.text.TextField) returns false.

Any insights on that? Am I doing something wrong?

Was it helpful?

Solution 2

Well as it appears, the problem was (as usual) with my own code and not the IS operator. Next time I'll try to be more careful and double check my code before posting. Sorry for spamming...

OTHER TIPS

You are asking for the Class Name with flash.utils.getQualifiedClassName(obj). The UITextField class extends the flash.text.TextField class. Thus the class is UITextField and not TextField.

Think of it this way

class TextField
{ 
}

class UITextField extends TextField
{
}

You need to use getQualifiedSuperclassName() to get TextField

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top