-
Urgent help TAB needed !!!!
Help...! I need my ENTER key to act exactly the same as my TAB key....
Does anyone have a quick script for this that I can use...
THANKS....
D..............
-
Heyyyy...all you smart Flash developers out there........
Don't all answer at once..........!!!!!!!!!!!!!!!!!!
-
Japanese l337
lol, i dunno man, is that even possible to do that via ActionScripting ??
consultant / contractor / designer
-
aaaAAAAAAAAAAAAANNNNNNNNYYYYYYYYYYOOOONEEEEEEEEEEE EEEEE..!!!
i KNOW u KNOW............!!!!!!
-
No!
maybe more info will help your cause. what is the enter key doing at the moment? the tab key? what code do you already have? what do you want the code to do?
-
Professional Air Guitarist
You mean act as the tab key in the way the tab key changes the selection of the current field/mc/button/etc?
-
Do u want to know how to tell if the enter key is pressed? That's:
if(Key.isDown(Key.ENTER)){
//put code here
}
-
I have a form with many fields, which tab in order....no problem there.....My audio file which cannot be changed, says to use the TAB or ENTER keys to tab the fields...
I have an OK button which validates the fields....the ENTER button is doing NOTHING...........
I want it to tab the fields in the EXACT same way the TAB key does...even if I make them both the same button
.tabindex = .enter
or something like that.......!!!
Helllpppppppppp.......
THNX.........!
-
Anyone have a solution for this..........!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
You need to create a listener (read it up in Flash help - they have a couple of examples and it is quite straightforward).
For example:
PHP Code:
someListener = new Object();
someListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
// Whatever code you need
}
};
Key.addListener(someListener);
-
give me the audio and ill edit out the enter bit. problem solved.
Other solution. replace your enter key with your tab key. PEOPLE CHANGE EVERY SINGLE KEY ON THE KEYBOARDS AT OUR SCHOOL. kids who cannot touch type go nuts trying to fix it. lol.
-
All very well avoiding the problem, but it is hardly necessary. Selection.setFocus combined with a listener will do everything you need.
-
Not only would it be easier, but wouldn't it save precious space???? lol, im just joking around i don't really mind.
-
Don't mind me, I'm a grumpy old git anyway.
I just don't want people going away there is no solution when there is one ...
-
Originally posted by AlsoGaiusCoffey
Don't mind me, I'm a grumpy old git anyway.
I just don't want people going away there is no solution when there is one ...
YOu should find the best solution. You can't be like a store that talks people into buying the crappy product that isn't right for the customer because its the only one in stock. the best solution for this situation doesn't involve ac... anyway im rambling and i don't give a sh** anyway. lol.
-
Thanks for the replies...
I have put in this code...
someListener = new Object();
someListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
name1TF.Selection.setFocus = 1;
name2TF.Selection.setFocus = 2;
name3TF.Selection.setFocus = 3;
name4TF.Selection.setFocus = 4;
name5TF.Selection.setFocus = 5;
}
};
Key.addListener(someListener);
and still my fields aren't tabbing when I hit the ENTER key...!
what am I doing wrong...???
-
Er ... you need to have a bit of code to select where you are and where you go to. What you have there selects five textfields in order, the same order each time, and leaves you always in the last field.
One way to do this is as follows:
1. Make an array of the textfields in the same order as your tabbing. eg:
PHP Code:
TF_arr = [tf1,tf2,tf3,tf4.tf5];
2. On keyPressEnter, search through the array to find the current TF then go to the next one, eg:
PHP Code:
var currentfield = Selection.getFocus();
var nextField = 0;
for (var i=0;i<TF_arr.length;i++){
if(currentfield == targetpath(TF_arr[i])){
nextField = i+1;
}
}
// Loop if nextField is bigger than TF_arr.length
nextField %= TF_arr.length
Selection.setFocus(targetpath(TF_arr[nextField]));
So you end up with:
PHP Code:
TF_arr = [name1TF,name2TF,name3TF,name4TF,name5TF]
someListener = new Object();
someListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
var currentfield = Selection.getFocus();
var nextField = 0;
for (var i=0;i<TF_arr.length;i++){
if(currentfield == targetpath(TF_arr[i])){
nextField = i+1;
}
}
// Loop if nextField is bigger than TF_arr.length
nextField %= TF_arr.length
Selection.setFocus(targetpath(TF_arr[nextField]));
}
};
Key.addListener(someListener);
Last edited by AlsoGaiusCoffey; 09-08-2003 at 11:54 AM.
-
i'll try it out......
thanks for your help.......
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
|