Flex :: Know Exactly What Numpad Key Is Pressed In AS3 (with Num Lock Disabled)?

Sep 11, 2009

In Actionscript 3 I see that if I press the "8" key (from the numpad) I got the result of keyCode of the numpad key "8", but when I disable the "Num Lock" and press the numpad key "8", the event I receive the keyCode of the Up Arrow key...

How to difference between the keys of the numpad (with Num Lock disabled) and the original keys, such as the Arrows, End, Insert, Delete and so on?

I've tried using the keyLocation property of the event, the value of that property is 0 for the arrows and 3 for the numpad, but when the Num Lock is disabled the value for the 4, 6, 2 and 8 in the numpad are 0, so I can't difference between the numbers with numpad disabled and the Arrow keys.

Also the numLock property of the Keyboard class didn't work, because I can't know if I press the Up Arrow or the 8 whit Num Lock disabled (because they trigger the same event, or I think that)

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Delaying Buttons - "lock" For A Few Seconds When It Has Been Pressed?

Feb 13, 2008

Below is a very simple button code.

[Code]...

And in the attachment you will see the fruits of this haaard work. My question: Is there a (simple and clean) way to "lock" the button for a few seconds when it has been pressed? Press the big grey ..thing in the attachment swf file multiple times for one of the many reasons~

View 1 Replies

ActionScript 2.0 :: Keeping A Disabled Button Disabled After Navigating Away From The Frame

Aug 2, 2008

I'm making a VERY basic Jeopardy game, and I need buttons to be disabled after being clicked on once.

Oh, and I'm working in CS3, but I'm using AS 1&2 because that's what I learned... I have no idea how to use AS 3...

example: frame 1 has btn11 in it. btn11 when clicked takes the person to frame 2. when done with frame 2, they click on return.

the return button (btnReturn1) has the following AS

on (release) {
gotoAndStop ("Round1",1)
btn11.enabled=false;
}

the problem is that it works at first - the button disables when I get back to frame 1, but the next time I click a different button then return to frame 1, the first button I disabled isn't disabled anymore.

my actionscript so that my disabled buttons stay that way no matter how many times I come and go from the frame? or if you have a better way to do it, that'd be great. basically, it's like the jeopardy screen, and after "songs" for 200 is clicked, I don't want it to be clickable again at all.

View 1 Replies

Actionscript 3.0 :: KeyPress - Add 1 Point To This Textfield Everytime Press A Numpad

Mar 2, 2011

I'm trying to create a scoreboard. Lets say 4 persons are playing, I made 4 textfields on the stage, named them scoreOne, scoreTwo, etc. Now I want to add 1 point to this textfield everytime I press a numpad. So, when player 1 earns a point, I'll press NUMPAD 1 and this point will be added to the textfield. Well, I wrote this code, but it only works once. I can use it for every player, but it's not possible to give them more then 1 point. What's wrong in the code?

I also tried to create a var, which stores the score. Isn't it easier to use a code that shows the var in the textfield, and if, how to do this? So far as I wrote the code the var isn't used yet, the only thing visible on stage is the (scoreOne.text = "" + 1;) part.

[Code]...

View 2 Replies

Flex :: Setting Disabled Button Appearance In Flex?

Apr 11, 2011

I'm making a trivia in an Air application, a question, three buttons, after you choose one, the right button gets coloured green, the wrong ones get coloured red. I was trying to do this changing the styles, so I created a Button.Right and a Button.Wrong style, but I also need to disable the buttons so they don't get clicked more than once while I'm showing the correct answers.

So I'm having trouble making it so the buttons don't look greyish and with the alpha turned down when I set their enabled property to false. I'm trying to be as minimalistic as possible here, changing disabled-overlay-alpha or disabledOverlayAlpha in the css file doesn't seem to do the trick, neither does changing disabledBorderColor

View 3 Replies

Flex :: Disabled Canvas Look And Feel?

Jul 27, 2009

Is there a way in Flex by which a disabled canvas looks exactly the same as an enabled canvas? I haven't been able to make sense of disabledOverLayAlpha and disabledColor properties for a Canvas component.

View 1 Replies

Flex :: Disabled The Doubleclick In Linkbutton

Nov 24, 2010

when i doubleclick on the linkbutton its still working i dont know even though i have made linkbutton doubleclickenabled property =false too.

View 1 Replies

Flex :: Lock Components In Flash Builder 4.5?

Aug 24, 2011

Is it possible to lock components when using design mode in flash builder 4.5?

I have created a custom component in catalyst that acts as the background to the application. I need to animate this component in different states, and these are all done in catalyst.

I then imported the flash catalyst project into flash builder as a library. I was then able to drag the component into my application using design mode.

The problem is that this component has been set to stretch to fit the whole application.[code]...

View 1 Replies

Flex - Changing The Appearance Of A Disabled Checkbox?

Jul 22, 2009

A disabled checkbox in flex looks very "light" colored, almost invisible. Is it possible to make it look like an enabled checkbox which does not do anything on a click event?

View 2 Replies

Flex :: Button - Use The Disabled-skin Defined In The CSS

Apr 13, 2010

I have a CSS file containing the following definition :

[Code]....

Now, I want to use the disabled-skin defined in the CSS, as the upSkin of b1. So something like b1.setStyle("upSkin","Tab.disabled-skin"); But I am struggling with the exact syntax of the second argument for setStyle. What should I use for the second argument for setStyle method?

View 1 Replies

Flex :: Combobox - Set A Control Focusable When It Is Disabled?

May 7, 2010

How to get focus for a disabled flex control. When a flex control is set with enable=false ,the control is not focusable and hence is not read by a screen reader. When a user tab's it should also go to the disabled controls.

View 1 Replies

Flex :: Show A Tooltip On A Disabled Control?

May 26, 2010

I'm displaying a list of buttons, some of which might be disabled. I need to show a tooltip on the disabled buttons with an explanation of why it's disabled, but it seems I can't disable the button without disabling the tooltip. Is there a simple way around this?

View 3 Replies

Flex :: TabNavigator Can't Handle Disabled Children?

Jun 8, 2011

I've got a problem while migrating my TabNavigator from Flex 3 to Flex 4.5. Stripped to the bare minimum, the following code will produce the bug, namely that the second child of the TabNavigator fails to be created properly:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"

[Code]....

Is this really a Flex bug, or is there something I'm missing? I'm using Flex 4.5.0.20967, and all of this worked well in Flex 3.5.

View 1 Replies

Flex :: Getting The Application's Enabled Disabled Event While Opening A Pop Up?

Mar 21, 2011

In my flex application I have several pop ups, when a pop up is opened the application is disabled and enabled back when the pop up is closed.Is there way to get application's enabled / disabled event and perform some activity like hiding a display object.I know, I can get open and close event of the pop up but I don't want to write it for all the pop ups and pay for maintainability.

PS: I am using PopUpManager to create pop ups.

View 1 Replies

Flex :: Button Skin Disabled Alpha Setting Ignored?

Nov 14, 2011

I attempted to build a Flex 4 skin for a Spark button, typical practice. I adjusted the colors and other styles to my liking, including using dot selectors to specify alternate colors and such during different states. However, these are all ignored when the button is disabled. Regardless of what I do, in the disabled state, my button always has the wrong color and is alpha'd to 0.5 (even if I specifically state that alpha.disabled="1"). All the other skin states work as expected. This is my custom skin. If it were working correctly, it would appear to have no shadow or highlight, and would be a gradient grey color. Instead, it appears as a 50% alpha version of the up state (shiny green).

<?xml version="1.0" encoding="utf-8"?>
<s:SparkButtonSkin xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="[URL]"
minWidth="21" minHeight="21" alpha.disabled="1">
[Code] .....

This is the code used to create and then disable the button:
_action1Button = new Action1Button();
view.actionGroup.addElement(_action1Button);
_action1Button.enabled = false;

The error was that _action1Button is not the actual button, rather, it's the container of the button. Doh! Switching it to _action1Button.actionButton.enabled = false; fixed the issue.

View 1 Replies

Flex :: While Loading Data Make All The Components Disabled In Adobe

Sep 27, 2010

I have a vertical tab-bar with 4 items with different sub tabs. All the four items use data from a single xml file, which is a big file. When the user clicks on a tab, while the data is being loaded this error is shown. TypeError: Error #1009: Cannot access a property or method of a null object reference. I want to disable all the tabs while the xml file is being loaded.

View 3 Replies

ActionScript 3.0 :: Flex In Properties View Convert To CSS Button Disabled

Jun 15, 2010

I am trying to once example in Flash Builder 4. But I got one error. When I go to In Design mode, select the Label control that reads Company Vehicle Request Form. After that when I go In Properties view, then I want to click the Convert to CSS button. But that time Convert to Css button is disabled.

View 2 Replies

Adobe Flex 4 Rendering Issues With Text In Disabled TextInput Component?

Apr 22, 2011

I have an application which displays employee information. If the user opening the detailed employee information page is not authorized to make changes I set the TextInput to disabled. Some users are reporting rendering issues with this. The TextInput's text value does not appear inside the box but is misaligned and is outside of the component. You can see the screenshow below of the disabled ID column where the numbers which are supposed to be in the TextInput box are far off to the right.

[Code]...

View 1 Replies

ActionScript 2.0 :: Make A Box That Fades In When Pressed On The Button And Fade Out When Pressed For The Second Time?

Nov 16, 2004

I have a function on root:

_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();[code]....

This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say

on (press){
_root.fade = true;
}

the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?

View 2 Replies

Flex :: Keep Focused After 'alt' Was Pressed?

Jan 18, 2011

I was making an application with AIR+Flex.

One Feature is like: when 'alt' key is down, the mouse cursor changes to B, when 'alt' key is up, the mouse cursor restores to A.

But the problem is that everytime a release 'alt' key, the mouse cursor will change back to system default (Arrow shape), and seems like the focus is on somewhere outside the stage.

That reminds me that, when 'alt' was pressed in a ordinary window, the menuBar will be focused.

How can I stop this default behavior?

p.s. I have tried the following ways and doesn't work:

1) listen to stage's KEY_DOWN/KEY_UP event, and add 'event.stopImmediatePropagation()' in the event handlers

2) listen to stage's KEY_DOWN/KEY_UP event, and add 'event.preventDefault()' in the event handlers

3) listen to stage's KEY_DOWN/KEY_UP event, and add 'this.setFocus()' in the event handlers. And 'callLater(this.setFocus)' doesn't work too.

View 1 Replies

Flex :: How To Get All Buttons Pressed With Return Key

Apr 23, 2010

Buttons in flex can be pressed with the space key, but a client would like to press enter instead of space. This can be achieved by programming each button, but it would be very time consuming. How to do this in the less amount of time?

View 1 Replies

Flex :: Pressed Key 's Charcode To String As UTF-8

Jun 6, 2011

private function pressedLetter(event:KeyboardEvent):void
{
pressedKeyLabel.text = String.fromCharCode(event.charCode);
}

According to code below, the letters such : "ı, ğ" could not be displayed at pressedKeyLabel, it shows different things. how can i display this letters correct ?

View 1 Replies

ActionScript 1/2 :: Keys Pressed Or Not Pressed?

Dec 6, 2010

I am struggling a bit with keys on the keyboards controlling a movieclip to happen.Ive got a person moving when pressing right and left, and a movieclip with three frames: First frame is a movieclip with the person standing still, looking bored. The second frame is the person moving right, and the third frame is the person moving left.This is the code that Ive inserted into the persons actions on scene1:

if (Key.isDown(Key.RIGHT)) {_x += speed;this.gotoAndStop(2);_xscale = +scale;} 
if (Key.isDown(Key.LEFT)) {_x -= speed;this.gotoAndStop(3);_xscale = -scale;}
 
this code works alright accept that when the keys are not pressed it doesnt stand still, the legs are still moving, so I tried to include this code aswell:

if (!Key.isDown(KEY.RIGHT)) [code]....this makes the person standing still when not pressed but not moving the legs when turning right and left.

View 3 Replies

Flex :: Enable Button To Keep Pressed (Down State)

Oct 20, 2010

I have skin a button with up, down, over, and disable states. I hope to know if there a code enable a button to keep press (down state) when the user press and hold a specific key link to that button. Something like down_button state.

View 2 Replies

Flex :: Find Out The Character Pressed Key In Languages?

Dec 27, 2010

I can't use charCode, or keyCode in KeyboardEvent to find out the character pressed, because even if I change the keyboard layout, charCode and keyCode are not change (if press the same key).So, how to find the presssed character, following to the current keyboard layout?

The charCode property is the numeric value of that key in the current character set (the default character set is UTF-8, which supports ASCII).is not correct.

View 3 Replies

Flex :: Simulate Tab Key Pressed On Flex?

Jan 26, 2012

It is possible to Simulate a Tab Key when another key is pressed? I'm looking to do exactly the same, but with the DOWN & ENTER Key.[code]...

View 2 Replies

Flex :: Button To Trigger Event Continiously When Pressed... Not Once?

May 27, 2010

I'm wondering if there's a way to configure a FLEX button so it behaves like a push button...

View 3 Replies

Flex :: List Component That Acts As If Control Was Permanently Pressed

Jun 1, 2010

I have a list control and i want the user to be able to select many items at a time. Thus I want it to act that if the control key is pressed while he is clicking. Eg if he clicks on a selected row it should become unselected and if he clicks on a unselected row it should become selected.

View 1 Replies

Flex :: Events - Prevent Exit Fullscreen When "ESC" Is Pressed In Flex?

Feb 11, 2010

We have a Flex application which goes fullscreen on startup (which is possible when it's a projector .exe). When a user presses ESC, the application exits fullscreen mode. Is there any way to prevent this? This because we want to use the ESC-key for other functionality.Normally all keyboard input is disabled in fullscreen mode, but not when we run it as a projector. I already tried capturing the FullScreenEvent.FULL_SCREEN event without luck (this event is only fired when the user selects "Full Screen" in the Adobe Flash Player or hits "CTRL + F".

View 3 Replies

IDE :: Why Are The Components In FLA Disabled

Feb 20, 2009

why are the components in my FLA disabled? nothing happens when i click on them.

if you cant open the attachments, change thier extensions from .zip to .rar

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved