Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Testing a text input box

New Here ,
Jun 26, 2018 Jun 26, 2018

I am trying to create a new Flash website with Adobe Animate.  I went ahead and put in a test input box on the stage, but when I select the "Test Movie in Browser" option, I can see the cursor change but am not able to actually enter any text. Do I need to add some ActionScript in order for users to actually type in text input?

Brand new to Flash here.

706
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 26, 2018 Jun 26, 2018

Hi.

Are you using a AS3 document or HTML5 (Canvas) document?

In AS3 documents, you have to select the text field, go to the Properties panel and set the text field type to "Input Text".

In HTML5 documents, as the Canvas element doesn't support text input by default, you'll have to use a "TextInput" component from the components panel.

Regards,

JC

Translate
Community Expert ,
Jun 26, 2018 Jun 26, 2018

Hi.

Are you using a AS3 document or HTML5 (Canvas) document?

In AS3 documents, you have to select the text field, go to the Properties panel and set the text field type to "Input Text".

In HTML5 documents, as the Canvas element doesn't support text input by default, you'll have to use a "TextInput" component from the components panel.

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 12, 2019 Jan 12, 2019
LATEST

This is how you get the value of a Text Input Component:

If your Text Input Component is named 'nametext' as the Animate instance name, retrieve the value with one of the following:

myVal = $('#nametext').val();

myVal = document.getElementById('nametext').value;

myVal = this.nametext._element._element[0].value;

myVal = document.getElementsByTagName("input")[0].value;

To see a list of available properties, use console.log(this.nametext); In a browser such as Internet Explorer 11, open the developer tools by pressing F12 and check the console for the log. Click on the + to see properties.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines