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
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
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
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
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
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
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
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
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
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
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
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
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
13 matches
Mail list logo