Update
Added a color when focused.
So here's a brief explenations:
I concieve every element as a Gui (Graphic User Interface) Element. So let's first create a group called "GUI Elements".
Now you can create 3 actors: input1, input2 and a button. To every actors created, change the group to GUI Elements.
Every element will import a behavior called "Gui Element". This behavior will handle the focus and apply an optional color effect. (Ideally, you can apply every effect you want).
Download the .zip below and attach the input image to every input actors and button image to button actor.
Note: the behaviors are saved as png files, but contains code! So import in your stencyl project the "Gui Element.png" and "inputUI.png" as actor behavior.
Then, to the input actors, you will attach the "inputUI" behavior. This will handle a lot of things.
Now you can create a "default" font, with 16 px, color black, so you can pass the font to the behaviors InputUI through the input actors.
Note that for every input dimension or font dimension, you will need to configure the parameters on behavior inputUI (such as padding-left, pading-right, etc).
Attach the actors to the scene. You should be able to write in the input.
To read your value, you can check the image "how read values.png" inside the .zip.
As I mentioned in the previous post, there are some issues:
1) At the moment, you can't set focus at the middle of your input string. The focus will be positioned at the end of string only;
2) Some special caracters aren't readable;
3) The number of characters that can be inserted depends on the width of actors and the dimension of font.
I think I'll work to add some features to the input, or work to realize a select box, dunno.
If you add some features, please share your informations.
I tested on flash and it's work fine. Then I tested on html5 but doesn't work properly.
You can also read numbers and set dinamically a property with that value, but I will explain on another tutorial.
PS: sorry if my English is not perfect
Cheers