After speaking with some colleagues, I have found some further
information.

1) This is definitely not a swfobject issue
2) The only known workaround is to somehow "disable" the flash movie's
behaviors while the user is hover on the div/dropdown/etc. that is "on
top of" the movie.

The implementation used to disable the flash movie's behavior would
require the use of ExternalInterface to send messages to the flash
movie, telling it to disable and re-enable its reaction to mouse
events.

I've come up with 3 ways to generally accomplish this, although there
are surely more.

Once the movie has received the message from javascript...

1) Show/Hide a layer in the flash movie at the highest level that
catches and discards the relevant mouse events.
2) Sets a variable in the movie, which is then checked whenever the
movie would normally handle a mouse event. If the variable indicates
that flash shouldn't react, then don't react. Otherwise, do.
3) Literally enable/disable the mouse events


The movie I am dealing with is fairly simple, so it was easiest (and
most elegant) for me to use #3. The only tricky point is that you have
to add/remove a MOUSE_MOVE event because when someone moves the mouse
from the div/dropdown/etc. straight onto the the movie, it does not
fire the MOUSE_OVER event, but will fire the MOUSE_MOVE event. So you
add the MOUSE_MOVE to react to that event, and then remove that event
listener (so it isn't constantly firing as the user continues to move
around).

So I had something like

// define action/animation for mouseover event
function over(e:MouseEvent){
        mclip.gotoAndStop(2);
}

// define action/animation for mouseout event
// should remove mouseMOVE event added by enable() - see below
function out(e:MouseEvent){
        mclip.gotoAndStop(1);
        mclip.removeEventListener(MouseEvent.MOUSE_MOVE,over);
}

// disable():
// Called by javascript to disable mouse events while hover over
// html dropdowns.
// The mouseOVER event that we remove here is added in the enable()
method,
// see note below
function disableMouseEvents():void
{
        mclip.removeEventListener(MouseEvent.MOUSE_OUT,out);
        mclip.removeEventListener(MouseEvent.MOUSE_OVER,over);
        mclip.removeEventListener(MouseEvent.MOUSE_MOVE,over);
}

// enable():
// Called by javascript to re-enable mouse events.
// We need to add the mouseMOVE event here because when the mouse
// comes off the HTML and onto the flash, flash doesn't fire the
mouseOVER,
// but will fire the mouseMOVE
function enableMouseEvents():void
{
        mclip.addEventListener(MouseEvent.MOUSE_OUT,out);
        mclip.addEventListener(MouseEvent.MOUSE_OVER,over);
        mclip.addEventListener(MouseEvent.MOUSE_MOVE,over);
}

// attach mouse events by default
mclip.addEventListener(MouseEvent.MOUSE_OVER,over);
mclip.addEventListener(MouseEvent.MOUSE_OUT,out);

// register functions for use by javascript
ExternalInterface.addCallback("disableMouseEvent",
disableMouseEvents);
ExternalInterface.addCallback("enableMouseEvent", enableMouseEvents);


hope that helps anyone that may stumble upon this in the future.

- seth

On Jun 25, 10:49 am, Sam Sherlock <[email protected]> wrote:
> I may be wrong.  This is what I understand of the situation.
> swfObject does ease the differences between browsers & OSs but this is a
> request beyond that and is a limitation of using flash with z-index and
> active areas
>
> Maybe Aran or someone else may be able to expand on this or prove that I am
> wrong.  I would expect difficulties with all browsers trying this
>
> but if on showing you menu you called a func via ex-interface within the
> movie to inactivate objects on the stage and another event to reactivate
> them when hiding the menu.  This is pushing the envelop somewhat.  Perhaps
> other will offer some further insight
> - S
>
> 2009/6/25 fattymelt <[email protected]>
>
>
>
> > So the difference between OSs and Browsers is in their implementation,
> > and not something inherent to swfobject?
>
> > I would expect that this issue would be rather common, so I'm
> > surprised to hear the only workaround is so complex.
>
> > On Jun 25, 10:25 am, Sam Sherlock <[email protected]> wrote:
> > > mouse active areas conflict with each other in this way.
> > > you'd have to ensure that the active area of the flash are removed whilst
> > > the drop down is displayed and thenreinstate them after.  This is not a
> > > swfobject issue - this would occur whatever method of swf placement you
> > > used.
>
> > > You can use ex interface to make this happen - this would be rather
> > complex
>
> > > - S
>
> > > 2009/6/25 fattymelt <[email protected]>
>
> > > > I'm using SWFObject 2.2 and dynamic publishing to place a flash piece
> > > > on a site that has html dropdown navigation. The navigation overlaps
> > > > the flash when you hover over it.
>
> > > > The dropdown correctly appears above the flash, but on a Mac (FF &
> > > > Safari) hovering over the dropdown ALSO fires the mouseover event on
> > > > the flash piece. Even more strange, on FF Mac (not Safari/Mac, though)
> > > > using FF's menu bar (e.g. File, Edit, Bookmarks, Tools, etc.) if the
> > > > menu is long enough to cover the flash piece, and you hover your mouse
> > > > over the portion that covers the flash piece, it ALSO fires the
> > > > mouseover event on the flash piece. Huh, say what?!
>
> > > > This problem does not seem to occur in any browsers on Windows.
>
> > > > Here is the test page
>
> > > >http://normalish.com/rollover_bug/
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to