How do you capture mouse events in FF, over Shockwave Object

By : Tanerax

How do you capture the mouse events, move and click over top of a Shockwave Director Object (not flash) in Firefox, via JavaScript. The code works in IE but not in FF.

The script works on the document body of both IE and Moz, but mouse events do not fire when mouse is over a shockwave director object embed.


  function displaycoordIE(){
     window.status=event.clientX+" : " + event.clientY;
  function displaycoordNS(e){
     window.status=e.clientX+" : " + e.clientY;
  function displaycoordMoz(e)
      window.alert(e.clientX+" : " + e.clientY);

  document.onmousemove = displaycoordIE;
  document.onmousemove = displaycoordNS;
  document.onclick = displaycoordMoz;

Just a side note, I have also tried using an addEventListener to "mousemove".

By : Tanerax


You could also catch the mouse event within Director (That never fails) and then call your JS functions from there, using gotoNetPage "javascript:function('" & argument & "')"


on mouseDown me
   gotoNetPage "javascript:function('" & argument & "')"

The mouse move detection is a little bit trickier, as there is no such an event in lingo, but you can use:

property pMouseLock

on beginsprite
   pMouseLock = _mouse.mouseLock
on exitFrame 
   if _mouse.mouseLock <> pMouseLock then
      gotoNetPage "javascript:function('" & argument & "')"
      pMouseLock = _mouse.mouseLock
   end if


By : luna1999

Just an idea.

Try overlaying the shockwave object with a div with opacity 0, then you can capture events on the div itself.

By : ken

@eric-z-beard: I would really like to be able to implement this on the database. I like your proposal, and while it seems to lead to something, I dont quite fully understand it. Could you elaborate? Please recall that each call will span over several seconds, and each second need to count. If using DATEPART (or something like it on MySQL), what second should be used for the GROUP BY. See note on simultaneus.

Elaborating over this, I found a way to solve it using a temporary table. Assuming temp holds all seconds from tStart to tEnd, I could do

SELECT temp.second, count(
FROM call, temp
WHERE temp.second between (call.start and call.start + call.duration)
GROUP BY temp.second

Then, as suggested, the web app should use this as a histogram.

This video can help you solving your question :)
By: admin