How can I use html/javascript to make <a> link trigger an embedded flash object?

Posted by MikeN on Stack Overflow See other posts from Stack Overflow or by MikeN
Published on 2009-06-15T21:22:58Z Indexed on 2010/03/24 23:03 UTC
Read the original article Hit count: 226

Filed under:
|
|
|

Using HTML/Javascript I want to make an link trigger a flash object that is normally triggered by clicking on the flash itself. The flash objects is actually the "Call Me Now" button from Google Voice which looks something like:

<object type="application/x-shockwave-flash" 
  data="https://clients4.google.com/voice/embed/webCallButton" 
  width="230" height="85">
    <param name="movie" 
       value="https://clients4.google.com/voice/embed/webCallButton"/>
    <param name="wmode" value="transparent" /><param name="FlashVars" />
</object>

When you click on the object the first time it brings up a set of fields to enter your phone number in to make the call. So I want to be able to trigger that action by having a user click on a different link (which would actually be the phone number that the widget would call.)

© Stack Overflow or respective owner

Related posts about flash

Related posts about JavaScript