homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

Flash to XHTML focus
Flash has focus, how to give an XHTML element focus when pressing tab?
JAB Creations

WebmasterWorld Senior Member jab_creations us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4297938 posted 9:25 pm on Apr 14, 2011 (gmt 0)

I have an object in Flash named 'widget1' and I'd like to give an XHTML element focus when the user presses the tab key while 'widgit1' has focus...so pressing the tab key would trigger widgit1's onblur event.

I've tried adding an event listener like so...

widgit1.addEventListener('keypress', ohhai);

function ohhai()
getURL("javascript:alert('oh hai!')");

However no matter what I do (and I'm 100% as I've got cache disabled in my browser and I re-public after every change) nothing happens. I've tried adding the event listener on the object directly, on different frames (first and last)...not really sure though once I get a JavaScript alert from pressing a key while widgit1 has focus I should be good. Is this something I'd have to associate with an onload event in example? Thoughts please?

- John


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved