• Home
  • Free Tutorials
  • Free Video Tutorials

Adobe Photoshop
Autodesk 3ds Max
CSS
Flash
Help Center Live
iPhone
Joomla
Make Money Online!
Mambo
mIRC
Outlook Express
SEO / SEM
Simple Machine Forum
Target Explorer

Static and Dynamic Input Text Box

Category : Flash Views : 31381
Version : 8 Rating : 
3.2/5 (60 votes)
  • Currently 3.22/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: static-dynamic-input-text-box.zip
Result: See the result


In Flash there are three types of text box:

Static
This is the most simple of the text boxes; you can't change its text on the run.

Dynamic
This text box allows you to change almost anything you could change while editing you flash movie.

Input
The same thing as the dynamic text, but this one accepts user input.

You can change your text to one of these types right after drawing a text box on the stage.
Free Flash Tutorials, Basic Tools, Static and Dynamic Input Text Box

Let's create a simple movie to demonstrate their differences.
Draw a new Static text box, and write "Name:" on it.
Free Flash Tutorials, Basic Tools, Static and Dynamic Input Text Box

Draw an Input text box next to the previous text. Give an instance name of "iText" and set the "var" to "_root.name". Free Flash Tutorials, Basic Tools, Static and Dynamic Input Text Box
"_root.name" is going to be the variable that holds the contents of this text box.
If the user types something on the Input box, the variable "_root.name" will have that same text.

Finally draw a dynamic box with these properties:
Free Flash Tutorials, Basic Tools, Static and Dynamic Input Text Box

Open the actions for the first frame and paste:
//this is the variable for the input box var name = "name here" //this is the variable for the dynamic box var text = "" //if the text on the Input box is changed this event is called iText.onChanged = function() { _root.text = "Hello " + _root.name + "! " + "How are you today?"; }

This is the result:
Free Flash Tutorials, Basic Tools, Static and Dynamic Input Text Box

That was the basics of Text Box, I hope you liked it.

More cool tech articles from other blogs.

Place your ad here
Loading...

How to Video Tutorials on software by Helpvids.com

Sponsors





Web Design
Studio | Advertisement | About Webzo | Contact Webzo | Terms of Use | Free Video Tutorials by Helpivds

Copyright © 2007 NR Concepts Ltd. All rights reserved.