0

HTML Structure

    <div class="dinz-slider-film trigger-vid">
<object width="480" height="340" class="vid-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="FlashID" style="visibility: visible;">
  <param value="sites/all/themes/subtheme/images/test.swf" name="movie">
  <param value="high" name="quality">
  <param value="opaque" name="wmode">
  <param value="6.0.65.0" name="swfversion">
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
  <param value="sites/all/themes/subtheme/Scripts/expressInstall.swf" name="expressinstall">
  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
  <!--[if !IE]>-->
  <object width="480" height="340" data="/sites/all/themes/subtheme/images/test.swf" type="application/x-shockwave-flash">
    <!--<![endif]-->
    <param value="high" name="quality">
    <param value="opaque" name="wmode">
    <param value="6.0.65.0" name="swfversion">
    <param value="sites/all/themes/subtheme/Scripts/expressInstall.swf" name="expressinstall">
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <p><a href="http://www.adobe.com/go/getflashplayer"><img width="112" height="33" alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"></a></p>
    </div>
    <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>
<script type="text/javascript">
&lt;!--
swfobject.registerObject("FlashID");
//--&gt;
</script>
</div>

Jquery Code:

$('.trigger-vid object.vid-flash').click(function() {
    alert('stop');
  clearInterval(play); //Stop the rotation
});

The following jquery code is working fine in mozilla. But not working fine in Chrome and IE 6+

I stuck with this... But i am pretty clear (or may be) with one thing that the problem is with above HTML Structure.

Any idea will be thankful and helpful...

Fero
  • 12,969
  • 46
  • 116
  • 157
  • possible duplicate of [javascript onclick event over flash object](http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object) – Shadow The GPT Wizard Feb 14 '12 at 08:11
  • It got nothing to do with jQuery - clicking a Flash is not possible with JavaScript.. maybe some browsers these days allow such thing but it's still not standard as far as I know. – Shadow The GPT Wizard Feb 14 '12 at 08:12

1 Answers1

0

Use onmousedown insted of onclick.

This answer is copy of duplicate question javascript onclick event over flash object

And it is answered by Darwin...

Community
  • 1
  • 1
Fero
  • 12,969
  • 46
  • 116
  • 157