Hi Divya,
If you are trying to add an as3 class directly to a flex object, it will
throw up an error.

For understanding sake I will call your textInput class as MyTextInput. If
you want to add this to canvas. Then you can do either of these two.

1)
var canvas:Canvas = new Canvas();

this.addChild(canvas);

var uicomp:UIComponent = new UIComponent();
canvas.addChild(uicomp);

var ti:MyTextInput = new MyTextInput();
uicomp.addChild(ti); // Please note that adding textinput directly to stage
or canvas wont work ..



approach 2.

2)

var canvas:Canvas = new Canvas();

this.addChild(canvas);
var ti:MyTextInput = new MyTextInput();

canvas.rawChildren.addChild(ti); // this will work.

Adding a plain , simple action script object ( non flex object like a sprite
) directly onto a flex container does not work.


Hope this helps.

On Sat, Aug 22, 2009 at 9:56 AM, divya <[email protected]> wrote:

>
> hi , every one
> i am new in action script . i am creating a textinput in action
> script  class which extends sprite. . and want to add it at canvas in
> application. but its not working. while if i  am adding textfield its
> working. what is the basic reason behind it. how  can i know  which
> control can be  add to a conatiner and which is not.
> please help me . i will be highly obliged to u.
>
> thanks and regards
> divya singh
>
> >
>


-- 
Regards,
Ganaraj P R

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to