![]() NOTE: After the test movie launches, go to the Control menu and make sure that Disable Keyboard Shortcuts is checked. You should see that the text field will accept your input. ![]() Then click inside the text field and start typing. InputField.type = "input" So now that we've set the type to "input", let's go ahead and test the movie. In order to make this instance an AS3 input text field, use the type property of the TextField class, and give it a value of "input" (the value must be specified as a string, i.e it should be in quotation marks). So if you test the movie now, you won't be able to type inside it. By default, an instance of the TextField class is of the dynamic type. We've set some of the text field's properties as well, such as the width, height, border, etc. InputField.y = 50 Here, we've created a new instance of the AS3 TextField class, and we've given it an instance name of inputField. Var inputField:TextField = new TextField() In the Script Pane, type in the following code: Select the first frame and then launch the Actions Panel. Open a new Flash ActionScript 3 document. We'll learn how to create them using code, how to set some of the properties, how to set the focus to an input text field, and how to set restrictions to which characters a user can type in them. In this article, we're going to learn how to work with input text fields in ActionScript 3. You will simply need to set the type to "input". An input text field can be created using the TextField class as well. This is in contrast to a dynamic text field which will only display information, and will not allow the user to alter that information. The user simply needs to select the text field and type inside it in order to place information. ![]() An input text field is one that accepts information from the users of your Flash movie. You can add input text fields to your Flash movie in order to allow text-based interaction from your users.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |