ActionScript 3.0 :: CTRL+UP Key Not Detected
Jun 6, 2010
I have been using the up/down, left right keys ito scale and rotate an object. I decided to change that to CTRL+up/down/left/right key so I could use the arrows to position the object.
When I change
if( event.keyCode == Keyboard.UP)
to
if( event.keyCode == Keyboard.UP && event.ctrlKey)
nothing happens.
I've tried a few tests and I can CTRL+left and CTRL+right fires an event, but CTRL+Up or CTRL+Down does not fire an event.
without the && event.ctrlKey added, all events work fine. So I knopw the CTRL key works and the arrows work. Just not CTRL+UP or CTRL+DOWN arrow together.
It might be my DELL laptop keyboard, but if so, many will have this problem.
View 1 Replies
Similar Posts:
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
Jun 23, 2011
When my focus is inside the input text field, pressing CTRL+ENTER works but ENTER does not.Pressing Enter when my focus is anywhere BUT the input text field works just fine..My intention is to detect if ENTER key was pressed after the user fills out the field, but it seems to only work for CTRL+ENTER
ActionScript 3:
// works:
stage.addEventListener(KeyboardEvent.KEY_DOWN, enterHandler);
// ignored:
email.addEventListener(KeyboardEvent.KEY_DOWN, enterHandler);
[code]....
ENTER results in charCode == 0, whereas CTRL+ENTER is charCode == 13 email was created using the Text tool and set to "Editable"
Note: I am testing in Chrome and Firefox running Flash v10
View 1 Replies
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
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
May 6, 2009
I have searched all afternoon, and I thought millions of people must have this problem, but couldn't find a single useful site.I have made a flash site, that works correctly for people with flash. People without Flash however, don't see anything but my background color. No yellowbar on top that enables them to download flash, and no message that they need to have flash either!I want to display a message when the user doesn't have flash, like on www.thehansofoundation.orgI just want the site to say that you need flash, you can download it here, and if you don't get it to install you have to contact your network administrator, because a lot of companies have disabled flash and I want their administrators to explain te problem and not the client I made this site for.
View 2 Replies
Aug 25, 2009
I'm trying to make a grid full of photos as an AS3 class. I would like mouseOver and mouseOut behaviour for the indvidual pictures however, only one of the pictures is triggering a mouseOver event ?_?
Code:
...
public class PhotoGrid extends MovieClip{
...
private function loadComplete(ev:Event){ var count:int = parseInt(ev.target.data.picCount); for(var
[code].....
As you can see event listeners are being added to all of the pictures that are being displayed, however, only one actually works.PictureLoader is a custom class extending MovieClip which has a child Loader object (the loaded picture)
View 3 Replies
Feb 4, 2011
I have issue with a value that should have just work, however, it seem to be a bug which I could not understand. Maybe you can find any bug?Note: I have no issue with the "begin" and "end", just "beginbegin" and "endend" always return false.My array values:beginbegin,endend,-,-,-,begin,end,-,-,-,begin,end,-,-,-,-,begin,-,endMy code:
private var xm:int = 0;
private function createBeam():void {
for(var a:int=xm;a<naArray.length;a++) {
[code].....
View 1 Replies
Feb 21, 2012
I've been experimenting with writing my first custom event. So I have a MovieClip class in the library called "Curtains". It plays an animation and at the end of the animation I have the code:
ActionScript Code:
stop();
dispatchEvent(new Event("closed"));
Now I'm creating an instance of this Curtains MC in my class below. The custom event is not being detected. Did I put the event listener in the wrong place? What did I do wrong?
[Code]...
View 9 Replies
Apr 17, 2009
I have some items in my library that are all identical. When I place them on the stage, I can see that they are identical width.
When I do a:
trace(mybuttonone.width);
trace(mybuttontwo.width);
trace(mybuttonthree.width);
It traces a different width for each. How do I get it to tell me "real" width instead of some made up number?
View 14 Replies
Jul 18, 2011
I'm trying to trace a message and testing some TouchEvent in Device Central with device Flash 10.1 Multitouch. I got TOUCH_BEGIN to work but I can't get TOUCH_MOVE trace message to appear even though I've pressed Alt and move the mouse at the same time on the display sprite. So what am I doing wrong?
Code:
package
{
[code].....
View 3 Replies
Apr 3, 2004
I'm try to make the Collision Detected with hitTest for long time but it doesn't work. I have two objecct one is the Spaceship and rock. When those two hit each other. I want it to show text "Collision DetectedFrame1 script
var rockCount = 0;
var rockTimeGap = 1;
var nextRockTime = 0;
[code].....
View 3 Replies
Mar 18, 2012
[URL]
My webcam works great with Skype and Cheese and it used to work great with a program called FaceFlow but now when i try to use it with FaceFlow i get the following pop-up: Adobe Flash Player can't locate a camera on my computer? I have installed via Synaptic the latest version of Adobe Flash Player which is 11,1,102,63 but without any affect?
Would it be possible to uninstall the present version of Adobe and use an older version in the hope that the webcam will be recognised?"
I did a quick test of FaceFlow the other day ...... I have two webcams for testing, one is an older model and the other a uvc compatible device.
Faceflow would not recognise the older model, only the uvc camera.
Seems you have come across the same problem "
View 1 Replies
Jan 21, 2011
I have a container with several movieclips in. I added an eventlistener to the container and on roll over i trace the e.target.name. The problem is when i roll over the e.target.name is the name of the container, while when i click the e.target.name is the target of the object inside the container. Anyone know how to solve this?
[Code]...
View 1 Replies
Jul 19, 2011
As with most IDEs when you type something that is an error it will highlight it with the red cross or red underline, and this is what used to happen in Flash Builder 4 but for some reason now it does not work.
I can type any old garbage and hit save, which forces the build (I have build automatically selected) and no error shows on the line, or in the Problems panel.
View 1 Replies
Dec 13, 2011
Detect the language of the user's iPhone in actionscript 3.
Alternatively I have a language selection screen currently programmed, I will probably leave it at that.
If anyone has any good links or resources for as3 iOS development
View 1 Replies
Jul 26, 2009
Is there a way to have a rollover's listener trigger it's method as long as the mouse is in bounds of the target movie clip? I have a rollover being listened for by a movie clip that contains multiple children and none that fill the entire space so the rollout event that is also registered to this same movie clip will trigger when I roll into the empty space.
I could probably add a new child that fills the movie clip and set it's alpha to something low like .01 but I was wondering if there was a different way to do this. So the question again is, how can I have a mouse rollover trigger as long as it is in the movie clip's bounds even if there are empty spaces without children in them?
View 3 Replies
Feb 8, 2012
I am building a tile based game, in which the player can digg away at all the tiles.The problem im having is that my collision detection code for the tiles only will detect a collision with the first tile placed, or any tile required i explicitly code its number in.
In all other examples, tutorials and code, this should work, and yet it does not on mine.heres the specific code , the array the cildren are stored in is called dirt, as they are dirt tiles.
ActionScript Code:
for (var m:int=dirt.length-1; m>=0; m--) {
forval.text=String(m);
if (dirt[m].hitTestObject(_player)) {
[code]....
this brings me onto another problem i am having, which is that now that the collision code is inside a for statement, the above code doesnt work correctly. normally the lastx and lasty should be recorded , and if there is a collsion, the player is shifted back to the last position there wasnt a collision.for some reason now, even though it should be looping faster and detecting the lasx and lasty even faster, it isnt, and although a collision is detected (only with child 0).
View 4 Replies
Apr 3, 2004
I'm try to make the Collision Detected with hitTest for long time but it doesn't work. I have two objecct one is the Spaceship and rock. When those two hit each other. I want it to show text "Collision Detected" This is my script
Frame1 script
var rockCount = 0;
var rockTimeGap = 1;
var nextRockTime = 0;
var startTime = getTimer();
[code]...
View 3 Replies
Aug 10, 2004
Using this script to provide a auto scrolling interface. Need an area in the center that does not scroll. Also wanted to add the _ymouse scroll too.
onClipEvent (enterFrame) {
shift = ((400-_root._xmouse)/20);
if (((this._x>=1300) && (shift>0)) || ((this._x<=-500) && (shift<0))) {
shift = 0;
}
this._x = this._x+shift;
View 3 Replies
Aug 10, 2004
Using this script to provide a auto scrolling interface. Need an area in the center that does not scroll. Also wanted to add the _ymouse scroll too.
onClipEvent (enterFrame) {
shift = ((400-_root._xmouse)/20);
if (((this._x>=1300) && (shift>0)) || ((this._x<=-500) && (shift<0))) {
[code].....
View 3 Replies
Apr 4, 2010
If I removeChild an object from the stage can it still be detected by a hittest? I have objects that are tweening off the stage and if they hit other objects they stop their tween i use removeChild to remove objects that I don't want a hittest to occur on which is the nature of my question.
View 1 Replies
Jun 27, 2010
I am facing error: 1113: Circular type reference was detected
package {
import nyt.ui.control.*;
dynamic public class AudioPlayer extends AudioPlayer{
public function AudioPlayer(){
return;
}// end function
}}
View 1 Replies
Jun 26, 2006
I have a REGISTERED Flash media server version with update 1 and when i try to start it I have this error in the evnet log : "FMS has detected system time is going backwards;shutting down server" i try to reinstall it, the system clock is ok
View 5 Replies
Oct 11, 2009
Assuming, for a rectangle that is controlled by the user using the arrow keys, that I do the following[code]...
Assuming that works in detecting the collision, what would I use to actually stop the rectangle from progressing through the wall?
View 1 Replies
Aug 11, 2011
I have another (newbie) question about FLARToolKit.This is Lee Brimelow's code to make 3 boxes on top of the marker.
package {
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
[Code]...
the flaw of this code is, after the marker detected, yes, the 3D object got rendered. but after the marker were not detected, the object still appeared on the screen (even though it did not move)
View 1 Replies
Mar 25, 2009
I am not able to detect the keyboard event CTRL+V on a swf using AS3 in IE. It seems to trigger the default browser behavior, and im not able to do anything.
View 2 Replies
Nov 22, 2005
I want to be able to capture Ctrl + another key. How do I do this?
I've got the following code from help:
var keyListener:Object = new Object();
keyListener.onKeyDown = function()
{
[Code]....
But I can't seem to be able to capture key combinations like Ctrl + another key.
For what I need to do, I really need to capture several key combinations. At the very least, I want to be able to capture Ctrl + another key.
View 2 Replies
Apr 3, 2012
The scenario: in Main, instances of class Bullet are spawned and added to the stage, and to the array bltarray, instances of class Enemy are spawned, added to the stage, and added to nmearray. This works fine.
The problem comes in seemingly sporadically, i.e. it works, then suddenly doesn't work soon after, when it doesn't work I get spammed with output errors and the score display is constantly rising, note it's the same instance of bullet and enemy. [code]...
View 1 Replies