Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: [flasher] RE: CAN IT BE DONE |
| From: | Tony McLawhorn |
| Date: | Fri, 09 Mar 2001 13:32:21 -0000 |
Ian Richardson wrote:
> Justin, does this work in V4 or V5.
>
> how do you set the action? any idea?
>
> on 2/3/2001 5:30 PM, Justin Ludington at jludington
>
> > <quote>
> > What i want to happen is for the cursor, each time to move to the text input
> > box automatically. Ie you fill in the first variable in frame one, press
> > next and the go to frame two, and the cursor to be in the box ready for the
> > user to enter..
> > </quote>
>
I use this in Flash 5 to tab between fields:
For every field you want to be able to tab to, they will have to be inside a
movieclip. For example, you will see my movieclip below as "mcName" being the
movieclips name in the Library as well as its Instance name after I drag it onto
the stage. The "Name" is the Variable name given to the input field after it was
created inside of the mc. After you have your fields created, then create another
mc symbol and place it in frame 1 on the stage. In frame 1 of this mc, I put the
following actionscript in it. In a nutshell, it traps all "tab keys" and performs
the script below. All other key input is allowed to be passed and entered into
the fields as a user types it. It works by first finding out which field it is in
by Selection.getFocus(). After finding that, it then
Selection.setFocus("_level0.mcStreet.Street"); to the next field I have
indicated. I also set mine to go back to the first field ("Name") if it is
currently in the last field.
Hope this helps.
// THIS CODE AUTOMATES TABBING BETWEEN THE FIELDS AS I WANT IT
onClipEvent (keyDown) {
if (Key.getCode()==Key.TAB) {
if (Selection.getFocus()=="_level0.mcName.Name") {
Selection.setFocus("_level0.mcStreet.Street");
} else if (Selection.getFocus()=="_level0.mcStreet.Street") {
Selection.setFocus("_level0.mcCity.City");
} else if (Selection.getFocus()=="_level0.mcCity.City") {
Selection.setFocus("_level0.mcState.State");
} else if (Selection.getFocus()=="_level0.mcState.State") {
Selection.setFocus("_level0.mcName.Name");
}
}
--
|>
| Tony McLawhorn
| Director of Educational Software Development
| College of Science and Mathematics
| University of South Carolina
| Columbia, SC 29208
| Tel: (803) 777-2883
| Fax: (803) 777-2451
| tony
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

