-
Is there a way to be able to use the tab button on text fields in flash 5 when you create forms?
-
The only way I know of to do this is to "cheat" by placing a button off-stage, so no one sees it when you play the movie. in Frame 1 I have
TOTALTEXTFIELDS = 5
but you can change that depending on how many you have.
I named my text fields TextField|0 through TextField|4.
Note that it's important to use the | character before your number, but whatever is before it (the TextField part) can be changed to anything.
On the button, put the actions
on(keyPress"<TAB>") {
current = Selection.getFocus()
numStart = current.indexOf("|")
trace(numStart)
text = current.substring( 0, numStart )
trace(text)
number = current.substring(numStart+1, current.length)
number = parseInt(number)
trace(number)
next = number + 1
trace(next)
if (next > TOTALTEXTFIELDS) {
next = 0
}
Selection.setFocus(text + "|" + next)
}
Hope this helps
Arctic
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|