Hello all,
I have a application to in creationComplete event to execute a function called
initApp();
This is initApp()..
import flash.text.TextField;
public var mtTXT:TextField;
public function initApp():void{
myTXT = new TextField();
myTXT.x = 343; myTXT.y = 10;
myTXT.width = 196; myTXT.height = 300;
myTXT.wordWrap = true; myTXT.border = true;
myTXT.multiline =true;
addChild(myTXT);
}
It compiles ok, but when it runs, it says TypeError: Error #1034: Type Coercion
failed: cannot convert flash.text::[EMAIL PROTECTED] to mx.core.IUIComponent.
at
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingChild()
But that TextField is inherited from DisplayObject which suppose to be abled to
used within addChild() function.
Any thoughts.
Thanks.
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.