[MX] Loading cursor in input field?

Say you have a form setup with one input text field and one submit button. Is there a way to have the cursor automatically be present in the input field when MC is loaded so that the user doesnt have to click in input field to begin typing. Hope this makes since.

Thanks for the help!

On a frame add this code…


Selection.setFocus(myInputBox);

Where myInputBox is the <B>Instance</B> name of your input text field. Putting it as the var name will not work.

That worked but I having a problem using it based on how my code is setup. On frame 1 a have all my main AS and on frame 2 I have gotoAndPlay(1); to create a loop. I will have to play with my code a bit but thanks for the command.

No problem.

Can you try this…

Put the code on an empty movie clip that is on the stage, then do this…

onClipEvent(load){
Selection.setFocus(myInputBox);
}

I don’t know if it will work, but it is worth a try.