Start learning with our library of video tutorials taught by experts. Get started

Creating a First Web Site with Flash Professional CS5

Creating input text fields


From:

Creating a First Web Site with Flash Professional CS5

with Paul Trani

Video: Creating input text fields

When you are going to create a contact form, the first thing you need to do is add some input text fields. So, here I am the sort of last frame of this site and I am just going to double-click on this Contact movie clip. Now, I am inside of this Contact movie clip and here are the fields that I want to be input text fields. So, currently this was actually just imported from the Photoshop, and it brings in this text as editable, which is what I defined when I imported it as TLF Text.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Creating a First Web Site with Flash Professional CS5
2h 45m Beginner Jul 27, 2010

Viewers: in countries Watching now:

Creating a First Web Site with Flash Professional CS5 shows how to make a fully functional, dynamic web site in Flash Professional CS5. This course covers the fundamentals of creating and importing content, adding smooth 2D and 3D transitions, and adding button functionality that goes beyond links. This course will also show how to integrate and control video and audio as well as how to implement a gallery and a contact form. Exercise files are included with the course.

Topics include:
  • Understanding web design
  • Creating buttons and web graphics in Photoshop
  • Formatting text with the Text Layout Framework
  • Using the Timeline
  • Creating a custom looping animation
  • Loading images in a gallery
  • Creating invisible buttons
  • Adding music and video to a site
  • Customizing video playback controls
  • Optimizing and publishing a web site
Subjects:
Web Interaction Design Projects
Software:
Flash Professional Illustrator
Author:
Paul Trani

Creating input text fields

When you are going to create a contact form, the first thing you need to do is add some input text fields. So, here I am the sort of last frame of this site and I am just going to double-click on this Contact movie clip. Now, I am inside of this Contact movie clip and here are the fields that I want to be input text fields. So, currently this was actually just imported from the Photoshop, and it brings in this text as editable, which is what I defined when I imported it as TLF Text.

So, that's perfectly fine. Notice that it's set to Selectable. Well, what I want to do is I want to change this to Editable so this is going to give the user the ability to edit this text field. All right, so I've done that, but I also need to adjust it a little further. So, I am just going to use my arrow keys to position this accordingly and then I am going to double-click on it and just expand out this text field, just like that. Then I'll just delete that word John Doe right there. But now again, this is an Editable text field.

I've cleared it out, and it's set up to accept any text the user enters in. I am going to do the same thing for Email. Again, I want to make sure this is Editable. I'll delete the information in there. I'll stretch it out and I am going to use my Selection tool just to kind of reposition it a little bit. Notice as I make them Editable it gives them this dashed line. Okay, so it's just a visual confirmation that I am getting all of this squared away. All right, this text field I am going to change it to Editable as well, and I'll just stretch it out just like that by grabbing that lower right node, and I'll delete that text.

Okay, one thing about this Message text field. I want to make sure that the lines wrap within this text field. So, let's check out some of my options in here as I go into Paragraph and then Container and Flow, these are all my options I get. But under Container and Flow what I have is Behavior. So, I want to make sure this is set to Multiline. Okay, so sometimes it might default to Single Line. Just make sure it's set to Multiline, and then I am ready to go.

Okay, so those are my text fields and also right here what I want this to be is I want this to be like a little feedback text field as well. So, I am going to go ahead and position that off to the side and I am going to make sure this doesn't contain any information whatsoever. So, in general I am slowly getting this set up to receive input. All right, this first text field right here, now that I have it set up, I am going to give it an instance name, and I'll just call it theName and for the Email, I am going to type in theEmail, and then Message is going to be theMessage.

Now, the reason I am adding "the" before each one is that I want to give it a specific name. If I have names that are too general, it might conflict with code within Flash. So, "the" or "my" is sometimes used as well but in general, they have unique instance names now. All right, so let's go ahead and test this out. Control > Test Movie. (Music plays) Contact section and I'll type in like that.

It works great, just like that, just like that. It works out great. One thing I have noticed though is if I am in this Name text field and I hit Tab, you sometimes might run into this issue. You want to give the user the ability to tab through all of these input text fields. But if I hit Tab, what Flash does is it just kind of refers to any button or any interactive object on the Stage starting at the upper left-hand corner.

So, I basically want to define the tab order. All right, that's the code I am going to add, so I'll close this file and right in here, again I am in this Contact movie clip. I am going to create a new layer, and I am going to call it Actions. I am going to select that first frame, and I am going to open up the Actions panel. All right, so I am just going to write some ActionScript from scratch. I'd basically need to add the tab index or the tab order of my text fields.

So, I am going to type in InteractiveObject because that text field is an InteractiveObject, and then just call it theName. That's the first text field, and I am just getting that text area. That's all I am doing is defining that one text field that's actually defined as theName. So, I've basically pointed to that object and I am making sure the tabIndex, and this is nice when I start to type in tabIndex.

It recognizes it as a tabIndex and actually gives me that code hinting. So, as soon as that selected, I could just hit Enter and it adds it and I can define this is the first object to tab. All right, so I am going to copy this code and paste it below, because I want to do the same thing for the Email. So, again I am just defining that input text field as an InteractiveObject. It's going to have a tabIndex number of 2. So, it's gong to be the second field that is tabbed to. The last one is theMessage, and I am going to set this tabIndex to 3 as well.

So, now I am going to be able to tab through all three of those and however many fields you have, you can kind of go on as long as you want, but I am going to go ahead and test out this movie. (Music playing) Type in, hit Tab, it goes to that field, like that, Tab, and it works great. So, again using tabIndex is just great way to get around any sort of little issues that you might have.

But other than that it's as simple as selecting any text field, making sure that it's set to Editable, and you are good to go. So, the next step from here is to send this information out.

Find answers to the most frequently asked questions about Creating a First Web Site with Flash Professional CS5.


Expand all | Collapse all
Please wait...
Q: I followed all the steps and suggestions in the "Adding a progress bar" video, but when I add the progress bar to my web site, I can’t remove it once the index.swf file loads up. The progress bar remains on the homepage and the rest of the pages. How do I make it disappear once the site loads?
A: To make it disappear, just make sure the progress bar is only in frame 1. If it’s on its own layer, then right-click on the 2nd frame in that same layer and select "Insert Blank Keyframe." That will make it disappear.
Q: Despite following the steps in the "Adding a progress bar" video, I cannot figure out how to keep the progress bar from appearing on a movie that has finished loading. How can I make the progress bar disappear?
A: Just add the red line below to the preloader.fla file. This will make the progress bar invisible: 
"function contentLoaded(evt:Event):void { //Optionally change to a clip holder and set progressbar visibility. addChild(contentLoader); progressbar.visible = false; }"
Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a First Web Site with Flash Professional CS5.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked