Click to See Complete Forum and Search --> : how to get tab focus on flash button in FF 1.5


tarunkrsna
02-07-2006, 01:46 AM
Hi ...

Learning a little flash from a free online course BUT teacher doesn't know how to fix this problem. I have checked out many posts on both flash and firefox forums but no answers found, so here is my flash / firefox problem:

Trying to set up a flash movie so that the mobility impaired can navigate via buttons using the tab key and the enter key.

The problem I have is that, in other browsers I've tested, pressing the tab key puts the focus on the first button designated tabIndex = 1, but in FF1.5 the tab focus remains in the toolbars of the browser, cycling from address bar to tabs of opened windows (even if only 1) and the search entry form.

To get the focus on the first button in FF1.5 it is necessary to mouseclick on the actual flash object (not even merely on the page); this seems to defeat the purpose of tabIndex accessibility.

I have tried a setFocus script in the actionscript but it does nothing and is not necessary for IE6 and slimbrowser.

My tab script is as below:

set (_root.btnEyes,tabIndex = 1);
set (_root.btnEyes,tabIndex = 2);
set (_root.btnHair,tabIndex = 3);

The actual flash object can be seen at http://www.sevamrta.com/test/faceFacts.html

Anyone know how to set this up so that the mobility impaired can tab navigate the flash object without needing to resort to the mouse?

Cheers
t3rry

ErolinDesigns
02-07-2006, 04:02 PM
I think you may able to do a document focus on the Flash object.

<script language="JavaScript">
<!--

document.FLASHNAMEHERE.focus();

//-->
</script>

tarunkrsna
02-08-2006, 06:29 AM
Kewl... never occured to me to set focus from OUTSIDE the flash object. I'll try it out.
thank you
t3rry

Robert Wellock
02-09-2006, 02:10 PM
Since flash is an external object it makes sense that Firefox chooses that behaviour.

ErolinDesigns
02-09-2006, 02:13 PM
Is it just Firefox? That script should also work in IE. I believe every browser will look at it as an object within the document, so that JavaScript should work regardless of the browser.