RE: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside
Actually, I was talking about movie clip based buttons. :) In my testing, it is both movie clips and buttons (symbol buttons) that fire the onRelease and onReleaseOutside when a key is pressed. HOWEVER, I just learned this issue only occurs when you test the SWF inside the IDE. Good to know! David [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Skoglund Sent: Wednesday, November 02, 2005 9:44 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside Sound like a similar problem to mine that I posted a couple of days ago. I got no replies i'm afraid. I think I'll create some movie clip-based buttons instead, but havn't had time to test if movie clips show the same behaviour or not. /David -- attached message --- Hi, I'm new to this list, heard about it from DirGames. I have a problem with button components that annoys me a lot, it seems lika buttons auto-activate whenever I move the cursor over them and have either shift, control or alt pressed..? I really need to use those keys while dragging objects around the scene Is there anyway to disable this behavior, or do you think I should I write my own components/button MC:s instead of using the default? Thanks for any suggestions! /David Skoglund ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside
That's good news! Thanks for sharing. /David --- Original Message --- From: David Stiller[mailto:[EMAIL PROTECTED] Sent: 2005-11-03 14:58:06 To : flashcoders@chattyfig.figleaf.com Cc : Subject : RE: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside Actually, I was talking about movie clip based buttons. :) In my testing, it is both movie clips and buttons (symbol buttons) that fire the onRelease and onReleaseOutside when a key is pressed. HOWEVER, I just learned this issue only occurs when you test the SWF inside the IDE. Good to know! David [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Skoglund Sent: Wednesday, November 02, 2005 9:44 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside Sound like a similar problem to mine that I posted a couple of days ago. I got no replies i'm afraid. I think I'll create some movie clip-based buttons instead, but havn't had time to test if movie clips show the same behaviour or not. /David -- attached message --- Hi, I'm new to this list, heard about it from DirGames. I have a problem with button components that annoys me a lot, it seems lika buttons auto-activate whenever I move the cursor over them and have either shift, control or alt pressed..? I really need to use those keys while dragging objects around the scene Is there anyway to disable this behavior, or do you think I should I write my own components/button MC:s instead of using the default? Thanks for any suggestions! /David Skoglund ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside
Sound like a similar problem to mine that I posted a couple of days ago. I got no replies i'm afraid. I think I'll create some movie clip-based buttons instead, but havn't had time to test if movie clips show the same behaviour or not. /David -- attached message --- Hi, I'm new to this list, heard about it from DirGames. I have a problem with button components that annoys me a lot, it seems lika buttons auto-activate whenever I move the cursor over them and have either shift, control or alt pressed..? I really need to use those keys while dragging objects around the scene Is there anyway to disable this behavior, or do you think I should I write my own components/button MC:s instead of using the default? Thanks for any suggestions! /David Skoglund - Original Message - From: David Stiller [EMAIL PROTECTED] To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 02, 2005 3:19 PM Subject: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside Is anyone else seeing this? Draw a shape, convert to button or mc. Code the following: btn.onPress = function() { trace(pressed); } btn.onRelease = function() { trace(released); } btn.onReleaseOutside = function() { trace(released outside); } Click the symbol to see pressed in the Output panel. Release, of course, to see released. Now click again, but hold this time. Now press any key. If you're over the symbol, you'll see released, even though you haven't; if you're not over the symbol, you'll see released outside, even though you haven't. This is a total bummer if you want to write a drawing app with Shift constrain or Ctrl whatever. Anyone know a workaround? David [EMAIL PROTECTED] Luck is the residue of good design. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Key down forces button/mc onRelease/onReleaseOutside
Hi David, Evan, the problem is that he loses the mouse release trigger when he accually released the button after pressing a key. I think the solution would be to create a custom press/release/releaseOutside functionality without using the built in movieclip methods. Mouse.addListener(this); Key.addListener(this); function onMouseDown() { //this.hitTest(_xmouse, _ymouse); trace('mouse down'); } function onMouseUp() { trace('mouse up'); } function onKeyDown() { trace(DOWN - +\tKey: +chr(Key.getAscii())); } function onKeyUp() { trace(UP - +\tKey: +chr(Key.getAscii())); } I tested it, holding the mouse down and hitting a key doesn't invoke the mouse up event. If you're extending a movieclip class then you're already listening to mouse events so you don't need to add your object as a listener, otherwise you will be recieving the mouse event twice. The hitTest method ( that I commented out ) can be used to determine whether your mouse is over a particular movieclip. I hope this helps you out. Good luck, H ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders