I think this is because of the way Flash handles focus and the way we listen for mouse events. kernel/swf/LzMouseKernel.as has some code that attempts to match up events across frames.

Flash has had more modern APIs since version 6 - perhaps we should be using them instead of the legacy Flash 5 movieclip events we're using now:
http://livedocs.adobe.com/flash/9.0/main/00001436.html

Sprites would need to instantiate a Button object when they're made clickable adn register for the appropriate events.

[email protected] wrote:
Hi Max,

Perhaps you (or somebody on laszlo-dev) has some thoughts on http://www.openlaszlo.org/jira/browse/LPP-7981. This is a swf8-only issue (at least on a PC). If you open a window with a button that is displayed under the mouse, the button requires 2 clicks if the focus has been set to another element on the window. If the user moves the mouse a single pixel, the button receives the very next click. At first I looked for a general solution but right now I'm looking for a workaround in the application. The other way to make it work is to NOT call setFocus() and the button is clickable.

Andre added a simpler testcase that mostly uses native Flash code.

I have not found a workaround. I tried to simulate a mouseover event on the button but I don't think Flash likes me hijacking mouse events.

Any thoughts?

Thanks!

Phil

--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to