[Flashcoders] Prevent space button passing click event to button (as3)

2009-12-02 Thread Paul Steven
I have created a game in AS3 that uses the SPACE bar on the keyboard to make the character jump. I have encountered a problem whereby pressing the SPACE bar causes a button on my game screen to be clicked. I read up that setting buttonMode to false would fix this but it does not seem to like me

RE: [Flashcoders] Prevent space button passing click event to button (as3)

2009-12-02 Thread Cor
My guess is that the button has the focus at that particular moment. So maybe you can set button.mouseEnabled = false; And set a listener to enable the button on pe. if mouseX and mouseY is at a specific point. HTH -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com

Re: [Flashcoders] Re:Trying to set multiple images to 'export for AS' with JSFL

2009-12-02 Thread Cedric Muller
but it isn't a MovieClip, is it ? A MovieClip can contain a (or multiple) Bitmaps, but a Bitmap cannot contain a MovieClip, so are these really the same ? and if you take lots of them: lots of Bitmaps are better than lots of MovieClips. ... or you can convert a MovieClip to Bitmap, but the

Re: [Flashcoders] Prevent space button passing click event to button (as3)

2009-12-02 Thread Henrik Andersson
Buttons are meant to be pressed like that. You are using the wrong object for the job. Here is my take on it: you have a game where there are button instances in the gui. I would add the keyboard listener to the stage as usual. However, in the listener, I would add a condition to ignore

RE: [Flashcoders] Prevent space button passing click event to button (as3)

2009-12-02 Thread Paul Steven
Thanks for the replies. When you say buttons are meant to be pressed like that - do you mean that it is standard practice to use the tab key to move between buttons and then use the SPACE key to click it? You are correct in assuming I have a game where there is a button on the interface that

Re: [Flashcoders] Prevent space button passing click event tobutton (as3)

2009-12-02 Thread Muzak
Try: gameMenuBtn.focusRect = false; - Original Message - From: Paul Steven paul_ste...@btinternet.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Wednesday, December 02, 2009 11:51 AM Subject: RE: [Flashcoders] Prevent space button passing click event tobutton

RE: [Flashcoders] Prevent space button passing click event tobutton (as3)

2009-12-02 Thread Paul Steven
Thanks Muzak - that appears to have done the trick. Nice one!! -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Muzak Sent: 02 December 2009 12:02 To: Flash Coders List Subject: Re: [Flashcoders] Prevent

Re: [Flashcoders] Prevent space button passing click event to button (as3)

2009-12-02 Thread Henrik Andersson
Paul Steven wrote: Thanks for the replies. When you say buttons are meant to be pressed like that - do you mean that it is standard practice to use the tab key to move between buttons and then use the SPACE key to click it? It wasn't implemented just to screw with people. It is how disabled

RE: [Flashcoders] Prevent space button passing click event to button (as3)

2009-12-02 Thread Paul Steven
Thanks Henrik - yes totally agree that it is a great accessibility feature - I guess it just tripped me up as this wasn't the case in AS2 as far as I am aware - think it was the enter button previously? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com

[Flashcoders] AIR: Application opened by someone else?

2009-12-02 Thread Eric E. Dolecki
I was wondering if there is a framework for determining if an AIR application has been opened by more than one person on a network? I have a data file that the AIR application opens and allows editing for. Works great, however instances of the application all open the same data file. The chances

Re: [Flashcoders] AIR: Application opened by someone else?

2009-12-02 Thread Chris
What you are mentioning sounds like the most logical course of action. You're basically implementing a 'lock' file within the application. The only issue with this approach is 'wedging' which can occur. If a user opens the application and their computer crashes, the file will be locked with no way

Re: [Flashcoders] AIR: Application opened by someone else?

2009-12-02 Thread Eric E. Dolecki
Chris, That's an interesting idea about the hard crash/power loss interval stamping. That's a circumstance I didn't think about. Right now I am displaying the number of running instances (if more than 1) and warning the users in the UI about data stomping... I'm not locking the data at the

[Flashcoders] AIR: application quit via update mech

2009-12-02 Thread Eric E. Dolecki
I am supplying cleanup for my application when a user quits the application view close button and control-q. Works great. However if there is an update triggered for the application, the updater quits my app and seems to bypass my cleanup mechanism (is there a special event to listen for) - or is