Groups | Blog | Home
all groups > flash (macromedia) > july 2005 >

flash (macromedia) : Flash MX 2004: Customize tab order of input text?


David Stiller
7/11/2005 8:06:01 PM
ghost zero,

[quoted text, click to view]

The code urami_ suggests goes into a keyframe. If you look up the
TextField class and the MovieClip class entries in the ActionScript Language
Reference, you'll see implementations of .tabIndex for each of those
objects. You'll also see additional code samples.


David
stiller (at) quip (dot) net
Tackling the ActionScript Language Reference
http://www.quip.net/tutorials/

Tom Unger
7/11/2005 8:31:23 PM
David Stiller;
Teach a man to fish... -Tom Unger

ghost zero
7/11/2005 11:19:29 PM
How can I customize the tab order of input text fields in Flash MX 2004? So
that tabbing will go through the sequence of input text fields the way I
prefer, regardless of how I have it arranged on screen. Thanks.
ghost zero
7/11/2005 11:46:10 PM
ghost zero
7/12/2005 12:00:00 AM
David Stiller:

I did give a shot based on corey's code but it didn't work out, so I'm hoping
someone can provide some clarification.

And when I said I'm a graphics guy--I meant it. I do graphics well beyond in
Flash itself. And I really don't encounter much coding in my profession. So
why waste time learning Flash coding in depth when I rarely use any of it,
where I may forget the codes, and when the code may change and become obsolete
in the future? Especially since my profession in graphics does not require any
coding skill. The question on this problem was based on personal interest.
urami_
7/12/2005 12:00:00 AM


[quoted text, click to view]

not sure mx 2004 but in mx you use

textOne.tabIndex=1;
textTwo.tabIndex=2;
textThree.tabIndex=3;

If you want a text field to not take tab focus,
textFour.tabEnabled=0



--
Regards

Urami

--


<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
ghost zero
7/12/2005 12:00:00 AM
Originally posted by: Newsgroup User
David Stiller;
Teach a man to fish... -Tom Unger

Well, I fish in a different pond--that is in graphics. I don't usually do any
coding other than paste what has been given to me. I think this is simple
enough for you coders, and I can open the .fla to see where and how you
implemented the code. Thanks!
coreysyms
7/12/2005 12:00:00 AM
in mx >
in the first frame of the movie or movieClip in the actions panel type:

//make your input text fields tab enabled
textField1.tabEnabled = true;
textField2.tabEnabled = true;
textField3.tabEnabled = true;

//set the tab order for the text fields
textField1.tabIndex = 1;
textField2.tabIndex = 2;
textField3.tabIndex = 3;

NOTE: be sure to 'un'-enable tabbing on other instances that will be picked up
by flash for auto tabing.

Example: if you have a button on the stage that you don't want to tab too, or
if you want to tab to that button ie. a 'submit' button, place a tabEnabled =
true; and a tabIndex order on the instance of the button as well.

See Below

//make your input text fields and submit button tab enabled
textField1.tabEnabled = true;
textField2.tabEnabled = true;
textField3.tabEnabled = true;
mySubmitButton.tabEnabled = true; // set to false to for this to not be tabed
to

//set the tab order for the text fields and submit button
textField1.tabIndex = 1;
textField2.tabIndex = 2;
textField3.tabIndex = 3;
mySubmitButton.tabIndex = 4;

good luck
corey
ghost zero
7/12/2005 12:00:00 AM
I can't seem to get it to work with what you wrote. Can you please make those
changes in my uploaded .fla file? I have already scanned the file for viruses
using Norton AntiVirus 2005 so it's safe. I'm a visual person, so you're
tutorial will make more sense to me once I open the .fla and examine it.
Thanks!
coreysyms
7/12/2005 12:00:00 AM
here

ghost zero
7/12/2005 12:00:00 AM
corey:

I'm pretty sure I followed your coding properly. But it doesn't work on my
form. Here is my updated .fla with your code:

http://s23.yousendit.com/d.aspx?id=05FS6VV6YBKX21I6BXYFFQQLTD

Is there anything I need to change? Thanks.
ghost zero
7/12/2005 12:22:50 AM
I'm not a coder. Can you please fix my .fla and send it to:
tsunamiyh@yahoo.com ...so I can see how you modified it? I want the
"comment" field to be the last field to be tabbed to. Thanks!

Here is my file: http://s6.yousendit.com/d.aspx?id=1SZTEFSHNATTD1SGOPM4ZCWBSB
David Stiller
7/12/2005 12:50:11 AM
ghost zero,

When Tom wrote this:

[quoted text, click to view]

He may have been referring to my tendency to do just as the adage
says -- or perhaps he was just reminding me of it. In any case, I agree
with him. Give a man a fish, and you've fed him for a day ... *teach* a man
to fish, you've fed him for life. Which helps the hungry fellow more?

[quoted text, click to view]

What that means is that you'll be here again -- and again and again.
And I would understand your trepidation if this particular endeavor were
difficult, but believe me, setting the order of tabs is one of the easier
things to do in ActionScript. In fact, both urami_ and coreysyms have given
you all the code you need. There's really nothing to it but to set the
order, as demonstrated.

[quoted text, click to view]

It *is* simple for us coders. But watch out how you fling around the
labels. ;) I'm a graphics guy, too. I do both and love it. :)

Just imagine how empowered you'd be if you gave it a shot? It could be
simple for you too.


David
stiller (at) quip (dot) net
Tackling the ActionScript Language Reference
http://www.quip.net/tutorials/

David Stiller
7/12/2005 7:43:30 AM
ghost zero,

[quoted text, click to view]

So do I. Business cards, fliers, book covers, logos, illustrations.

[quoted text, click to view]

Hey, to each his own. :) I encounter plenty of coding, and the
combination of that and graphic design leaves me with that many more
projects to tackle. I love it.

[quoted text, click to view]

Believe me, setting tab order is not in depth. That's what I've been
trying to tell you. Certain things in Flash really are *that simple.* This
is one of them. Sure, you didn't get it immediately, but even though you
tried, I have no idea how hard you tried, or for how long.

[quoted text, click to view]

If you forget, you crack open the documentation. Most of the answers
are in there.

[quoted text, click to view]

I guess there are all kinds of graphics people. I can think of plenty
of colleagues who work in video, multimedia, game development, web design,
on and on, who are primarily designers. They have all come upon a situation
where programming of *some kind* became a need -- even if it was a personal
one.

You may not realize it, but I'm trying to encourage you, hoping to get
you to think out of the box. I'm not saying you have to become a
programmer. Not even saying you *have* to learn any code (how I could I say
that?). Just suggesting you consider not being so closed on the
possibility.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

ghost zero
7/12/2005 8:03:51 AM
coreysyms
7/12/2005 6:21:52 PM
oh boy... well it works with me... and prob most others... sorry you didn't get
it working.

But i ask the question... what is a graphic artist doing with flash...
particulaly the creation of forms that could become a serious coding project.
why not stay with in your means of creative ability, i would not take on a
project for a client that i could't handle, or is beyond the scope of my
education / skills or whatever. but if i did i would make sure i retained the
info that i 'stumbled' across in a new creative teritory.

just make sure you learn in the proccess.. leave the copy and pasting to the
amatures.

teach a man to fish :)

good luck
corey
ghost zero
7/12/2005 8:39:01 PM
corey:

AddThis Social Bookmark Button