Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this a bug? Tabbing through fields ... 1

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
Please tell me if this is just poor design of my part or a handycap in FLASH ...

Have small movie with 12 layers. On layer 2 (quotes) I've set a group of input fields split in two columns. On the first column I have 13 single line fields and on right column, I have one multiline field.

On layer 7, I have a horizontal menu with 7 buttons.

As I access form via button with action 'gotoandplay', the form display ... it's all good. I click on first field and type something in and tab expecting to go to next field. Well, I jump to horizontal menu two buttons after chosen button to access form page. Two tabs later, and I am back to next form field.

Why is this? Why am I jumping to menu buttons instead of going down the column on input fields?

Should I switch layer position? Am I missing a simple but very important step?

Please help .... 8-(

Thank you all in advance!

Regards;


josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Guess this will be your second vote for me this evening...


Regards,
new.gif
 
This is great but I can't get it to work. My form is within main timeline on frame 26.

I created the invisble button and dragged it into main scene on same layer and frame as form. I then righ-click button and chose action. Within action, I typed:

on (keypress &quot;<Tab>&quot;) {
if (Selection.getFocus() == &quot;_root._level0.companyname&quot;) {
Selection.setFocus(&quot;_root._level0.firstname&quot;);
} else if (Selection.getFocus() == &quot;_root._level0.firstname&quot;) {
Selection.setFocus(&quot;_root._level0.lastname&quot;); {
} else if (Selection.getFocus() == &quot;_root._level0.lastname&quot;) {
Selection.setFocus(&quot;_root._level0.title&quot;); {
} else if (Selection.getFocus() = &quot;_root._level0.address1&quot;) {
Selection.setFocus(&quot;_root._level0.address2&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.address1&quot;) {
Selection.setFocus(&quot;_root._level0.address2&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.address2&quot;) {
Selection.setFocus(&quot;_root._level0.city&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.city&quot;) {
Selection.setFocus(&quot;_root._level0.state&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.state&quot;) {
Selection.setFocus(&quot;_root._level0.city&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.city&quot;) {
Selection.setFocus(&quot;_root._level0.zipcode&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.zipcode&quot;) {
Selection.setFocus(&quot;_root._level0.dayphone&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.dayphone&quot;) {
Selection.setFocus(&quot;_root._level0.nightphone&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.nightphone&quot;) {
Selection.setFocus(&quot;_root._level0.faxnumber&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.faxnumber&quot;) {
Selection.setFocus(&quot;_root._level0.email&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.email&quot;) {
Selection.setFocus(&quot;_root._level0.comments&quot;);
}
} else if (Selection.getFocus() = &quot;_root._level0.comments&quot;) {
Selection.setFocus(&quot;_root._level0.compnayname&quot;);
}
}


I interpreted from the tutorial that I needed to identify full path and adding _root is what I figured was missing.

What do you think? Oh, can I capture SHIFT-TAB? If so, what's the string &quot;<SHIFTTAB>&quot;, &quot;<STAB>&quot; ...?

Thanks;

josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Hey, I just removed a groupd of brackets since they did not appeared to be properly paired.

The script now looks like this:
on (keypress &quot;<Tab>&quot;) {
if (Selection.getFocus() == &quot;_root._level0.companyname&quot;) {
Selection.setFocus(&quot;_root._level0.firstname&quot;);
} else if (Selection.getFocus() == &quot;_root._level0.firstname&quot;) {
Selection.setFocus(&quot;_root._level0.lastname&quot;);
} else if (Selection.getFocus() == &quot;_root._level0.lastname&quot;) {
Selection.setFocus(&quot;_root._level0.title&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.address1&quot;) {
Selection.setFocus(&quot;_root._level0.address2&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.address2&quot;) {
Selection.setFocus(&quot;_root._level0.city&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.city&quot;) {
Selection.setFocus(&quot;_root._level0.state&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.state&quot;) {
Selection.setFocus(&quot;_root._level0.city&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.city&quot;) {
Selection.setFocus(&quot;_root._level0.zipcode&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.zipcode&quot;) {
Selection.setFocus(&quot;_root._level0.dayphone&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.dayphone&quot;) {
Selection.setFocus(&quot;_root._level0.nightphone&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.nightphone&quot;) {
Selection.setFocus(&quot;_root._level0.faxnumber&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.faxnumber&quot;) {
Selection.setFocus(&quot;_root._level0.email&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.email&quot;) {
Selection.setFocus(&quot;_root._level0.comments&quot;);
} else if (Selection.getFocus() = &quot;_root._level0.comments&quot;) {
Selection.setFocus(&quot;_root._level0.compnayname&quot;);
}
}

but it still does not work ... I am also having problem with text size on a few fields. I have made sure that they are all the same height (20 - info panel) and font (verdana). Text character is set to verdana/12 on all fields and yet, some of them look smaller ... I noticed that when I placed the cursor on those fields, it looks high within the the field box.

Regards;


josel


PS: Thank you for pointing to the above tutorial! If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
You shouldn't be using _root._level0... which are really the same.

on (keypress &quot;<Tab>&quot;) {
if (Selection.getFocus() == _level0.companyname&quot;) {
Selection.setFocus(&quot;_level0.firstname&quot;);
} else if (Selection.getFocus() == &quot;_level0.firstname&quot;) {
Selection.setFocus(&quot;_level0.lastname&quot;);
... Etc...Etc...

Sure this is really on the main movie's timeline, and you &quot;form&quot; is not within a movie clip?

If that still doesn't work, post a link to your .fla, or e-mail it to me at tektiper@hotmail.com.

I'll have a look at it, correct it, and send it back to ya!
And maybe I'll even start a new thread so you can vote for a third time tonight! LOL

Regards,
new.gif
 
Old, thank for offering to go the extra mile. Here is the link


This is a small movie ... I welcome any and all suggestions; so feel free to bring up any technical concerns which you may notice.

Thank you once again!

Jose Lerebours

If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Hey OLDNEWBIE, never mind, I got it!

I still had a couple _root in there and at least one line had a single = ... I was missing that nice window that opens up telling about your script syntax problems just as you press F12 to test/view movie.

Thank you very much for your assistance!

Regards;


Jose Lerebours

If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Fine you beat me to it, but check the thread I started, for another suggestion... Setting the cursor in the first input field!

Any given user can't vote twice for the same other user in the same thread!

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top