HTML5 - TextFieldType.INPUT not working!

Hi,

i spent almot an hour to figure out why my Text field is not working as an Input field…

I am making a drawing board app and trying to add the text to the stage as Input field to allow the user to type anything.

what i did :

i have a function to return me the text field:

and giving it the format:
image

and clicking on the stage, i am adding it to the display list:

also setting up the stage focus to it [which is also tracing it] but nothing works it just adding the text there and not allowing the input.

i also tried other targets :

HTML 5 = no
Flash = yes
Windows = no
Neko = no

i am wondering that it is working perfectly on Flash target , am i missing something ?

thanks

Possible you have to forget addchild() because Flash need "AddChild(textfield);

Than it shows. If you don’t know how do it work? If you make sure like AS3 of Flash like tutorial of “Add sprite on flash”. Textfield is like sprite. You can open easy example of bit101 minimals component or easy tutorial.

hi did you read my code ?

Maybe it is because it is selectable = false?

1 Like

hi,

yep that’s the problem :smiley: never think of that asking it to be input text and then asking it not to allow selection lol my fault.

thanks

Does this really work on Flash Player? It lets you input text, but not select it after you input it?

Thanks :slight_smile:

i will test it again on all targets and let you know .

hi,

yes only Flash target is allowing me to write with textField.selectable = false; but it won’t select the text , other targets aren’t allowing to type or select.

Okay, thanks for the feedback. We’ll look into this difference when we can :wink:

2 Likes