Flex :: AIR Using Command And Ctrl Keyboard Events?
Jan 15, 2010
I am writing an AIR application in Flex. The application needs to be able to handle shortcuts on both Mac and Windows. I have the shortcuts on the Windows side working, but the same application on a Mac doesnt seem to trigger the commandKey property on a Keyboard event when the user is also using another key in combination (ex. command+g doesnt work)
View 2 Replies
Similar Posts:
Oct 17, 2008
I have a Flash movie which fills the whole browser window. This means that always the key events are catched ("stolen") by the Flash movie only, when using Firefox. IE7 seems to be working as I want.
I want for example ctrl+w (close window), ctrl+n (new window), ctrl+t (new tab) to work in Firefox while the focus is on my Flash movie. How to accomplish this?
View 7 Replies
Aug 25, 2008
The flashplayer catches all keys pressed by the user. I'd like to know if there's a way or workaround to pass them to the browser. For instance, Ctrl-T (open new tab in firefox). I'd like to re-enable this shortcut. Maybe with javascript?
View 1 Replies
Jul 20, 2011
I need to fire an event by pressing CTRL+s.
I tried this but it won't work:
if(e.ctrlKey == true && e.keyCode == 81){
trace("CTRL+S")
}
View 2 Replies
Mar 12, 2010
I am adding a key listener to my AIR application like so:
<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml"
keyDown="onKeyDown(event)">
Yet only sometimes when I press keys does it actually invoke. I have no clue why, I thought maybe something else has focus. Well I cannot add key listeners to NativeWindow or NativeApplication, and I would assume if it is on the WindowedApplication which is the root element, that as long as my application has focus the key presses should invoke the listener.
View 1 Replies
Jan 14, 2011
I have a Sprite which is a child of a Flex object, and acts as the main "game window". So during game-play it should get keyboard input but at other times not. When I add a keyboard listener to it, it never fires.
Do I need to stop parent objects 'eating' the events somehow, or something similar? I get the same thing with mouse-wheel events, but mouse-click events are fine. Sprite doesn't seem to have the concept of focus unless I missed it.
More generally in this kind of approach, are there any suggestions on the best way? For instance some keys might still be needed to be intercepted before getting to the game-window, like ESC or F1 or something... the aim is the game-window isn't aware of other UI.
View 3 Replies
Nov 7, 2009
I have 2 scenes. In both scenes, I have a movie clip that moves via keyboard control. If the goto next scene is triggered by the movie clip in the first scene the keyboard control works in the second. However, if I use a button to move to the next scene then there isn't any control over the movieclip in that scene. I've traced the keyCode in the second scene and it is picked up but the switch statement doesn't run. I'm migrating to Actionscript 3.0 and updating something I created in 2.0. I would like to do it without writing a class.
[Code]...
View 5 Replies
Jul 29, 2011
I am implementing an application timeout feature (flex4). What I am finding is that mouse and keyboard events, which I have listened to with :
FlexGlobals.topLevelApplication.addEventListener(MouseEvent.MOUSE_MOVE, resetLastActivity);
FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_DOWN, resetLastActivity);
are being masked by the existence of any popup windows. The code is in a component, in the constructor. The component is added to the main application in the block.
How can I get these system generated events to not get stopped by PopUpManager display objects?
View 1 Replies
Feb 9, 2012
I'm working on a Flex 3 app, implemented in Actionscript 3 and MXML, that includes an embedded video player, which is essentially a black box--I load it as a SWF from another site on demand, and I don't have access to its source code. It does, however, inherit from Sprite.The problem is that, when focus is on the Flash app, the video player is somehow receiving and processing keyboard events, even when the player itself isn't in focus.So when users are typing text elsewhere in the GUI, if they hit the space bar, the video pauses.
I've tried intercepting key events in the Sprite's parent, and setting tabEnabled = false, tabChildren = false, and buttonMode = false on the Sprite, but nothing seems to work. It's as if the Sprite is getting keystrokes through an alternate Event path.how I can prevent the player from receiving keyboard events or input events entirely? It's fine with me if no input events reach the player, since I've implemented my own,separate video controls.
View 1 Replies
Jun 25, 2008
I got this code
[Code]....
and it works but now I need to use two simultaneous keys for example Ctrl + S, is there a way to do that using actionscript 3?
View 14 Replies
Nov 8, 2010
handling global keyboard events in Flex, is to attach a listener in the application complete event of a Flex application. However, no matter what I try, I have not been able to catch events without clicking on a point on the page, which is hosting my Flex application.
Moreoever, if I use a Flex component in a web application, where there is also html and Javascript, I'd still like to be able to grap global keyboard events, even if the embedded flex component (in flash player) does not have focus. So is there a reliable method for connecting flex applications and components (when they're embedded in a web page) to keyboard events?
View 1 Replies
Feb 5, 2011
This one's been irking me for a while. When I'm using the mouse scroll wheel to scroll up and down in a webpage, and a flash movie comes into the path of the cursor, the scroll wheel stops working. Also, when a flash movie has focus, you can't use browser shortcuts like Ctrl + L or Ctrl + R.
I'm writing a flex application now and I'd like to find a solution, so that at least my users aren't plagued by this inconsistency of the user interface behavior.
I should think there would be a way to tell flash to propagate such events as the mouse scroll wheel and keyboard input back up to the browser unless they occur in an element for which they are useful, like in a flex textarea. I can't find any solutions out there though, nor even anyone talking about it.
Specifically, how can I make it so that:
When the user is scrolling with the mouse, the browser scrolls unless the mouse is over a flex container with scrollbar, or another component that wants to scroll.When the user presses a button or combination of buttons on the keyboard, it will be propagated to the browser unless there is an active keyboard listener, or the cursor is in a text field, etc.
View 3 Replies
Nov 26, 2010
My Flex application is heavily keyboard-oriented. It uses 100% of the browser window and I'd like the user to be able to start using it immediately - as soon as it loads. However, it seems that the application is only first "activated" (i.e. the activate event fires) when the mouse clicks somewhere inside it, which is very inconvenient for my keyboard-heavy app.
Can I force an activation of my app at some point during/after it loads? I hope I don't have to display some silly "click inside to activate" overlay every time the page loads..
In certain browsers ([cough] Chrome [/cough]) the focus is lost whenever the user switches away from the browser (or even touches the address bar) and is not regained when switching back. So the solution has to take in consideration not just the first focus when the page loads but also "re-focusing".
View 2 Replies
Sep 27, 2010
Unde linux, the foreign keys such as... do not seem to work with this code:URL...The output is wrong under Linux, but Windows is Ok.the output of foreign keys such as ü with Linux looks same here, totally broken, two chars appear: URL...
View 1 Replies
Jul 28, 2011
I'm tracking the keyUp state of the CTRL key and I'm okay with the results except when it comes to key combinations. The code I wrote below is for you to see what the issue is.
Press the CTRL/Apple key and you'll see it traces "CTRL on". Release it and you'll see it traces "CTRL off". No problem there. Now press CTRL and then press the A key (as in select all), now release A, then release the CTRL key and you see nothing traces. Does anybody have an idea about a workaround to that? I prefer not to use a continuous ENTER_FRAME hack for that if any.
[Code]...
View 7 Replies
Nov 21, 2011
How to disable Ctrl+W or Ctrl+C and Tab for .swf file
ctrlKey = false; in KeyBoardEvents but how to apply it to the stage.
View 2 Replies
Aug 5, 2010
Well i have an adobe air which runs vlc-player at background as service. i check that in Windows Task Manager , the service runs when air application launches.
here is the code
processArgs.push("--extraintf");
processArgs.push("rc"); //Remote control
processArgs.push("--rc-fake-tty"); //Use terminal as output
[code]......
View 1 Replies
Mar 2, 2011
I want to call 3 commands one by one , the relation between each commands are command should execute one by one in the previous command result. How to Queue Command's? What is the best practice to handle Queue command , my requirement is adding n number of commands and execute them.Main -> Execute c1c1 got the Result - Execute c2c2 got the Result - Execute c3
View 2 Replies
Sep 30, 2009
I'm trying to write a simple counter. UP or Space increments a number and DOWN decrements. It's just one big number in the middle of the screen. A bell rings on an increment and I have added code to go full screen on mouse click.[code]...
View 1 Replies
Oct 1, 2009
I'm trying to write a simple counter. UP or Space increments a number and DOWN decrements. It's just one big number in the middle of the screen. A bell rings on an increment and I have added code to go full screen on mouse click.
Test mode works fine ( except for full screen of course).
Seems to work fine on the local machine using Safari 3.2.3
However if I try to run it locally using firefox it does not work.I need it to run on a laptop but it does not always acknowledge the keyboard events and while in full screen it never responds to the keyboard events.Laptop is running Safari 3.2.1
import flash.display.StageDisplayState;
import flash.events.KeyboardEvent;
var chickCount = 0;[code]..........
View 2 Replies
Apr 7, 2011
I was looking at this game called "Tsunami Fighter" (if you google it, it'll be the first thing that pops up�I can't post links sadly) which is a keyboard mashing game. Basically you have to mash a certain keyboard button as fast as possible to stop the rage bar from reaching the top. I tried some things that I thought would work,
How would I script the keyboard mashing part of this game (The part where you have to keep a greater keyboardclicks/second than the rising bar You'll know what im talking about if you play the game. I'm not really concerned at the score or the graphics just the keyboard event thing.
View 3 Replies
Apr 1, 2010
I created an E-learning project for a customer that has pages that require the user to make keyboard entries. When the user enters a specific letter, the page progresses. The pages work as expected until the customer places the project in a 'wrapper' that controls the navigation. When this is done, the user can make the keyboard entries, but now the page will not progress to the next section. It seems that the wrapper is stopping the system from detecting that the specific letter is pressed.
View 7 Replies
Mar 12, 2012
why the swf does not catch any keyboard events? When i Ctrl+Enter my .fla there is a message appearing that says: "Your content will not stream. Runtime Shared Library (RSL) preloading will require all of your content to download before the first frame will play. To prevent this you can change the Runtime Shared Library Library Settings in the Advanced ActionScript 3.0 Settings dialog which can be raised from the Public Settings dialog. The Runtime Shared Libraries being preloaded are: textLayout_1.0..........."
View 17 Replies
Jun 23, 2011
is it true that keyboard events can not be accessed outside of the stage on non display objects?
example:
package
{
//Imports
import flash.events.EventDispatcher;
import flash.events.KeyboardEvent;
[Code].....
here i would like to initialize a new TestClass() then press a on the keyboard to receive the output Test Class: a.
View 1 Replies
Jul 16, 2009
I have a key.addlistener setup to listen to key events.What I want to be able to do is to dispatch key events by for example a mouse click or just on load. I've tried a lot of possible solutions such as dispatchEvent with type as "onKeyDown" and "keyDown" etc.... but key listener simply do not treat it as a keyboard event.
Code: Select allvar eventObj = new Object();
eventObj.type = "keyDown";
eventObj.code = 13;
eventObj.ascii = 'e';
dispatchEvent(eventObj);
View 1 Replies
Jun 6, 2009
seem to have trouble getting a keyboard event within a class to work, I have an ENTER_FRAME event which works fine, but the keyboard event never gets called.[code]
View 2 Replies
Aug 9, 2010
Is there way to navigate to various buttons on a stage using only the keyboard? I have several movies (complete with cover art) on my Flash stage. I want to convert them into buttons so that anytime a user navigates to that button and presses enter, it will take them to a new frame (where I will have information about that particular movie). I know how to do this with Mouse clicks. But, this application requires users to use arrow keys in order to navigate and not the mouse.
View 3 Replies
Aug 12, 2010
I finally found a way to exactly position my External SWF on the main stage. Here is the Actionscript I placed on an empty layer:
Code:
this.createEmptyMovieClip("externalSWF",1);
externalSWF._x=550;
[code].....
View 2 Replies
Jan 15, 2011
currently learning AS3 and having a bit of trouble with keyboard events. I feel like I understand how they work, but something about my implementation is faulty. This is basically the code I currently have, and I can't find an error in it based on tutorials and such that I've looked up:
Code:
package {
import flash.events.KeyboardEvent
[code]....
View 2 Replies
Feb 2, 2010
I want my animation to STOP when I press SPACE, and then PLAY when I press SHIFT. This needs to be in AS3. The only catch is that my whole animation is composed of 5 Scenes. Would this be a problem? Also, I'm confused as to where I should add the code. I have it in a class and it still doesnt work. I tried putting it on the 1st frame on Scene 1.
View 1 Replies