Flash / AS

Blend / WPF
ASP.net / PHP

Photoshop

Forums
Blog

About

 


FlashComponents
  Galleries
  Slideshows
  Menus
  Design & Effects
  Audio & Video
  User Interface
  Templates

 

 

Tab Ordering Forms
       by Sharif aka the Reefster : 11 July 2004

If you're viewing this tutorial, it's probably because you're one of those flashers that are trying to use the tab key to only focus on a certain type of object in flash.



[ Click Name and use the tab key as you type ]


In this case, we're going to make the tab focus on textboxes. The problem here is that when the tab key is pressed to scroll through the form inputs, it can sometimes scroll through other objects like buttons too, which can be annoying.

Note

When you press tab the 4th time, notice it won't go back to the name input box. That's because tab also works for HTML, so it will scroll through the navigation bar on the left of this tutorial. But when you make your swf and publish it as a website with no HTML elements, it will work perfectly.


Here Is How:
  1. Open up a new flash document and use the text tool to create 3 input textboxes. Give the first one the instance name of name, the second location and the third age for the example.
     
    Textbox Settings


     
  2. Now you can make some text next to the inputs saying name, location, etc.
  3. In a new layer, open up the actions panel (f9) and insert this into it:
     
    name.tabIndex = 1;
    location.tabIndex = 2;
    age.tabIndex = 3;

    Explanation
    This states that name is the textboxes instance name. tabIndex = 1; states that it is the first one it will focus into when the tab key is pressed. You can now control which one goes after which.
  4. Test the movie.
That's it! All you did was create the boxes, name them and add the script. Now when you create a form with lots of objects such as buttons and whatnot, you can have the tab key work specifically for your text boxes.

If you have any questions, feel free to post on the forums.

Sharif
the Reefster

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
The Text Animation Component for Flash CS3
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.
Check out our high quality vector-based design packs! Flash Effect Components

Flash Templates
CSS Templates
Dreamweaver Templates

flash menus, buttons and components
Digicrafts Components The best flash components ever!
Entheos Flash Website Templates Free Flash Page Flip
flash components Buy and sell FLAs at Ultrashock!
Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com create flash slideshow as easy as 1,2,3
Learn how to advertise on kirupa.com