A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Tab order in Flash Forms

  1. #1
    Junior Member
    Join Date
    Apr 2000
    Posts
    4

    Question

    I have created a mail form in Flash. It all works fine but I would like to be able to press tab and move on to the next text field as you would in HTML. When pressing tab in my flash form it just goes on to the next object and not hte next text field.
    Is there a way to make it move to the next text field?
    Thank you

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    195

    Unhappy

    Unfortunately.. Flash gives you no control over the TAB order. That is determined by Flash at run time, based on the position of elements on the stage.

  3. #3
    Junior Member
    Join Date
    Apr 2000
    Posts
    4

    Thumbs up

    Thank you for you reply. I didn't think there was a way of doing it but I thought I'd check before I told the client this.

  4. #4
    Junior Member
    Join Date
    Apr 2000
    Posts
    1

    Post

    hmmm, just a thougt. I am far from an actionscripting guru but...

    I know it's possible to assign hotkeys to buttons.

    IF it is possible to set the focus using actionscript, you could intercept the TAB being pressed and switch focus to the next box.

    You would need a variable (counter) to track what box the focus was currently in and move to the next one. You would need to set the counter correctly whenever anyone clicked in a text box to set focus with the mouse as well.

    Not sure if this would work, but might be worth a look.

    Viking

  5. #5
    Senior Member
    Join Date
    Feb 2000
    Posts
    195

    Thumbs up

    That's a good idea, Viking! Unfortunately.. I do not believe there is any way to control the focus from Actionscript.

    However... There is a way by which you could make that idea work...

    You could create your own "text fields" using movie clips, and some Actionscripting. You would need a movie clip for each letter/number/character, and one for the cursor. Then you would need some Actionscript which would duplicate/remove the correct letters depending on which keys were pressed. You could then track your own "focus", and grab the TAB key to change the "focus" of your own "text fields".

    There is great potential in that idea.. You would have total control over the behavior of your "text fields". You could generate some very neat effects, like text flying into position when typed.. or a unique or animated cursor.. or "dancing" text. The sky's the limit, as they say. But.. it would be a good deal of work.

    IF I get a chance.. I will attempt to put together such a "text field", and submit the FLA to the Movies section. I cannot say just yet when I will get the time to do that.. but I'll try.


    <EMBED src="/cgi-bin/ubb/Members/sigs/00000205.swf" quality=high WIDTH=500 HEIGHT=50 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    195

    Talking

    Ok.. that did not take me as long as I thought.. I have a working demo. I shall submit it to Flash Kit soon.. until then, you can view it at:
    http://www.rjscs.com/scotty/demos/textfields.html

    or download the ZIP from:
    http://www.rjscs.com/scotty/demos/textfields.zip

  7. #7
    Senior Member bigczech's Avatar
    Join Date
    Apr 2000
    Posts
    240

    Talking

    That is pretty sweet. Good job.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center