Rheves Posted August 9, 2007 Share Posted August 9, 2007 I'm putting a captcha on my site that also has an audio accompanying it. In order to get the captcha characters spoken aloud you need to hover your mouse over the flash movie graphic. Since our site sells products for blind and visually impaired people, making them put the mouse over a graphic...isn't an ideal way to have the characters spoken. I downloaded this captcha so I can't modify it, but is there a way to emulate mouse hovering through "onfocus" on "onkeydown" or something like that? Any help or advice would be appreciated, thanks in advance. Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 9, 2007 Share Posted August 9, 2007 I'm not sure I quite follow what you're trying to do... but if you have a webpage, the function to play a sound must be called in an element's onmouseover somewhere. Just change that onmouseover='someFunction();' to onfocus='someFunction();'. Incidentally, you can cycle through all focusable elements on a webpage by hitting 'tab' repeatedly. So if you can instruct the user to tab through your products, you can play the relevant sound at each onfocus event. Here's a small example: <html> <body> <a href='product1.html' onfocus="alert('Product1');">Product1</a> <a href='product1.html' onfocus="alert('Product2');">Product2</a> <a href='product1.html' onfocus="alert('Product3');">Product3</a> <a href='product1.html' onfocus="alert('Product4');">Product4</a> </body> </html> Try tabbing through the page above, then post back if any of this helped. Quote Link to comment Share on other sites More sharing options...
Rheves Posted August 10, 2007 Author Share Posted August 10, 2007 Sorry I wasn't clear, I'm using the captcha from this page: http://www.nswardh.com/shout/ There isn't an onFocus or anything like that in place already, I was just wondering if I COULD use one. This is the code where the audio is called: <div style="float: left" > <object type="application/x-shockwave-flash" name="movie" data="audio/voice.swf" style="width: 50px; height: 57px"> <param name="movie" value="audio/voice.swf" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="menu" value="false" /> <param name="quality" value="high" /> </object> </div> Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 10, 2007 Share Posted August 10, 2007 Reheves - I have used teh same captcha and you can modify it to work in other ways.... I can send you an altered flash file that is triggered by javascript rather than the user having to interact with the flash file itself... HOWEVER..... In terms of acesibility you may wish to consider producing an aural style sheet... the aural style sheet can trigger soundfiles to be played at certain points in the document. Not sure about its support (not really tried it but if you sell to people requiring this kind of service then you should invest in the same technologies they have to test your site) Have a look here http://www.w3.org/TR/REC-CSS2/aural.html note the cue:before: url('png.au') - that tells teh client to play that soundfile just before those html elements are encountered... Hope it helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.