If a user has never visited a site, then the first thing we want them to do is register. You probably want them to have some access to find out what the site has to offer, but you will constantly remind them that they should register. Registered users bring a database to help you promote the site as new features and games are added. Some users will gladly register and are happy to receive information via email; others will deliberately give a fake address in order to remain anonymous. High score tables are the most effective encouragement to register particularly when linked to a prize-winning game. There will be no point winning a prize-winning game
On the registration page we are going to create we will collect the name, password, email, company, address, telephone number and fax number of the user. Only the name, password and email will be made mandatory. When you are creating form-based web pages it is recommended that you set the focus to the first field that you want the user to enter, and ensure that the users can tab through the different fields. Flash MX introduced a new property of an instance, ‘tabIndex’. If you set the tabIndex property then automatic tab ordering is disabled and only the instances with a specifically set tabIndex are included in the tab ordering. A text field can be given an instance name in the properties box for a text field and then this instance can be given a tabIndex in code. In ‘Example\Chapter19\Register.fla’, the focus is set to the variable with the name ‘name’. Assuming this variable is an input box and that this box is visible, the caret, the flashing line that indicates where text input will be directed, will be set to that field and will flash. Be warned that Flash does not allow the caret colour to be set to any colour other than black, so if your input box has a black background it will not be visible, this can be
Figure 19.1 Creating a registration page.