Adding a caret to an input field when entering a page

Hi there.

I have an text input field on page2 of pages I have made. Is there a way to have the caret (flashing cursor) ready to receive typed input when the page is entered? Here is the code I have for the field:

const numberInput = new TextInput({
    width: 200,
    height: 60,
    size: 36,
    font: "Arial",
    color: black,
    backgroundColor: white,
    borderColor: black,
    borderWidth: 2,
    corner: 10,
    align: "center"
})
.center(page2);

I am using the code in Adobe Animate so this may be a factor.

Thanks

Rod

I think you should be able to by setting the textEditor.focus = true;

And that would be on the pages.on("pagetransitioned", ()=>{})