header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
flexxx
Points:150
Posts:0

7/20/2010 9:48:05 PM

Title: Issue of addChild and addElement


Hi
I am getting problem with addChild method.
I am extending the radio button class because I want to give multiline label to the radio button and therefore overriding its createChildren method as suggested to me in my last post (Title : multi line radio button label)...

Following lines are there in the code:

labelTextField = IUITextField(createInFontContext(UITextField));
labelTextField.styleName = this;
labelTextField.multiline = true;
labelTextField.wordWrap=true;
addChild(DisplayObject(labelTextField));

Now the problem is I am exception on last line of the above code.
the exception is:

"addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one."

When I try to use addElement(), it gives me compilation error.




1
Justin
Points: 600
Posts:0
7/21/2010 3:44:37 AM



hi buddy your question is interesting , i want to solve it , but I can work after 2 hrs.

2
flexxx
Points: 150
Posts:0
7/21/2010 4:25:44 AM



ok...plz reply in the same post if you get any solution.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+3 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions