therabbitwindfall / flash-console

Automatically exported from code.google.com/p/flash-console
0 stars 0 forks source link

Console is not picking up mouse up, unable to cancel a move or resize drag. #112

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Either clicking on the lower right corner to resize the console, or clicking on 
the upper left corner to move it.
Once left down clicked a resize or move will not release.

What is the expected output? What do you see instead?
Expect the console window action to stop resizing, and, or stop moving once I 
release the left mouse button.

What version of the product are you using? On what operating system?
Same issue on 2.6 and 2.7. Internet Explorer 9.

Please provide any additional information below.
I'm attaching the console via a custom Preloader SWF.
(See: 
http://jpauclair.net/2010/02/17/one-swf-to-rule-them-all-the-almighty-preloadswf
/)
I am not sure exactly at what stage to attach the console to, but I managed to 
find a working solution via a Event.COMPLETE then a Event.ADDED (off the 
main/preloader stage) events.
I get a "Moved console on top (alwaysOnTop enabled), 49 attempts left." once 
the SWF is done loading to an semi-idle state.
I don't have the source to the target SWF but I decompiled it to find it has 
it's own MouseEvent.MOUSE_UP event handlings.
One in particular of note: ".addEventListener(MouseEvent.MOUSE_UP, 
mouseUpHandler, false, 9999, true);"

Could perhaps that it's setting the priority be a problem?
Do I need to mod the flash-console source to set a priority higher then 9999 so 
that Cc get's it's MouseEvent.MOUSE_UP event first?

Original issue reported on code.google.com by yourneig...@gmail.com on 30 Dec 2013 at 2:10

GoogleCodeExporter commented 8 years ago
If the source has event.stopPropagation() inside their MouseUP event handler, I 
don't think there is much you can do. Worth try recompiling flash console with 
higher priority and capture phase for mouse up event and see if it helps.

Original comment by luay...@gmail.com on 30 Dec 2013 at 10:55

GoogleCodeExporter commented 8 years ago
Thanks, that is probably the culprit.

I see in the source exactly:
public function mouseUpHandler(event:MouseEvent) : void
{   
   ...
   event.stopPropagation();
}

I will try that. I would think that if I set the console's event priority 
highest it should fire off first, thus delaying the target's 
"event.stopPropagation()" call until after.

Thanks for the awesome drop-in console :-) 

Original comment by yourneig...@gmail.com on 31 Dec 2013 at 12:43