Answered
Is It Possible to Put Placeholder text into a Text InputBox?


Hi.
You can set its placeholder property as this TextInput component is a regular HTML input text under the hood. Just keep in mind that components are not immediately ready when the code in the first frame of the main timeline runs. So one of the approaches is to listen for the stage's drawend event. Like this:
function main()
{
var inputTF = document.getElementById("yourInstanceName");
inputTF.placeholder = "Something...";
}
stage.on("drawend", main, this, true);
Regards,
JC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.