;

PDA

Click to See Complete Forum and Search --> : Tab Index to event handler actions ???


billy nugz
07-24-2008, 06:06 PM
Hey Guys,

I was wondering if it is possible to set a tab index to recognize event handlers on key press of the return/enter button.

I have no idea if this is possible but basically I have a bunch of actions tied to various movie clips. I know I can set the tab index in the accessibility panel. But once that item is highlighted, if the user hits the enter button on the keyboard, is there some way to trigger the listener that is on the movie clip ?? does that make sense???

Here is roughly how my buttons are set up.

function click1(event:MouseEvent):void {
myText.htmlText = "one";

}
function click2(event:MouseEvent):void {
myText.htmlText = "two";

}
function click3(event:MouseEvent):void {
myText.htmlText = "three";

}

one.addEventListener(MouseEvent.MOUSE_DOWN,click1) ;
two.addEventListener(MouseEvent.MOUSE_DOWN,click2) ;
three.addEventListener(MouseEvent.MOUSE_DOWN,click 3);


Any help would be great. I don't even know where to begin with this one. Thanks guys.

5TonsOfFlax
07-24-2008, 06:56 PM
Although I haven't tried this, I would expect that you could add a KeyboardEvent handler on these objects. When you've tabbed over to them, they have focus, and should dispatch keyboard events.

billy nugz
07-25-2008, 09:17 AM
Yah adding a Key event I dont think would be a issue. However if a user is mouseing through the site and hit entre it would then trigger the first index event, maybe its just a limitation but I will try doing that.

Thanks for the pointer thow. any other suggetions are still welcome