Loading ...
Sorry, an error occurred while loading the content.

Re: simulate click on flash object

Expand Messages
  • Sasha
    hello Nicholas, thanks for the reply. i found on adobe site some documentation: http://www.adobe.com/support/flash/publishexport/scriptingwithflash/sc
    Message 1 of 4 , Jun 1, 2008
    • 0 Attachment
      hello Nicholas, thanks for the reply.

      i found on adobe site some documentation:
      http://www.adobe.com/support/flash/publishexport/scriptingwithflash/sc
      riptingwithflash_03.html , but i think the click on the object (on
      certain areas to trigger on press event) is out of the question.
      maybe i should ask for the movie to be modified to accept events
      other than external clicks.

      thanks


      --- In ydn-javascript@yahoogroups.com, "Nicholas Zakas" <nzakas@...>
      wrote:
      >
      > I don't believe you're doing anything I wrong. I think (but am not
      sure)
      > that Flash movies don't actually receive DOM events from the
      browser.
      > Although the <object> element will respond when you put an onclick
      event
      > handler on it, Flash handles click events on movies by itself. In
      the
      > normal flow of a web page, a click maps as both a DOM click event
      and a
      > Flash click event, but in this case it seems that the Flash click
      event
      > just isn't generated with the simulated click. I wish I could lend
      more
      > insight, but I'm just not that familiar with the internal working of
      > Flash.
      >
      >
      >
      > Regards,
      >
      > Nicholas
      >
      >
      >
      > ________________________________
      >
      > From: ydn-javascript@yahoogroups.com
      > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Sasha
      > Sent: Saturday, May 24, 2008 6:26 AM
      > To: ydn-javascript@yahoogroups.com
      > Subject: [ydn-javascript] Re: simulate click on flash banner
      >
      >
      >
      > this is the flash object:
      >
      > <object allowScriptAccess="always" id="flash_object"
      > onclick="alert('click');"
      > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      >
      codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swfl
      as
      > h.cab#version=7,0,19,0
      >
      <http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#v
      er
      > sion=7,0,19,0> "
      > width="250" height="250">
      > <param name="movie" value="/movie.swf" />
      > <param name="quality" value="high" />
      > <PARAM NAME="allowScriptAccess" VALUE="always">
      > <embed src="/movie.swf" quality="low"
      > pluginspage="http://www.macromedia.com/go/getflashplayer
      > <http://www.macromedia.com/go/getflashplayer> "
      > type="application/x-shockwave-flash" width="250"
      height="250"></embed>
      > </object>
      >
      > i've tried this piece of code on a flash object:
      >
      > <script type="text/javascript">
      > var element = document.getElementById("flash_object");
      >
      > //simulate a click Alt key down
      > YAHOO.util.UserAction.click(element, { altKey: true});
      >
      > </script>
      >
      > it actually prints 'click' but it does not execute the on (release)
      > event inside the flash banner (it doesn't simulate the click
      itself).
      >
      > can someone please tell me what i am doing wrong?
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.