Problem with the assignment of functions to the keyboard. Help, please!

Hello

I'm trying to get the help of the keys on the keyboard to control the navigation of the timeline. I use the code AS3 work the first time, but a little crazy then past and stops working for some reason any. You are supposed to be able to navigate along the timeline with the arrow keys (go back)

I'm sure there is an easy solution to this problem but I am new to AS3 and it cannot know.

Any info would be greatly appreciated.

See you soon.

Code on the first frame of the timeline (left label)

Stop()

stage.addEventListener (KeyboardEvent.KEY_DOWN, f1_KeyDownHandler_3);

function f1_KeyDownHandler_3(event:KeyboardEvent):void

{

switch (event.keyCode)

{

Case Keyboard.LEFT:

{

gotoAndStop ('Center')

break;

}

Case Keyboard.RIGHT:

{

gotoAndStop ('left')

break;

}

}

}

Code used on the fifth framework of timeline (Center label)

Stop()


stage.addEventListener (KeyboardEvent.KEY_DOWN, f1_KeyDownHandler_2);


function f1_KeyDownHandler_2(event:KeyboardEvent):void



{

switch (event.keyCode)

{


Case Keyboard.LEFT:

{

gotoAndStop ('left')

break;

}

Case Keyboard.RIGHT:

{

gotoAndStop ('right')

break;

}

}

}

Code used on frame timeline tenth (good label)

Stop()


stage.addEventListener (KeyboardEvent.KEY_DOWN, f1_KeyDownHandler_3);


function f1_KeyDownHandler_3(event:KeyboardEvent):void


{

switch (event.keyCode)

{


Case Keyboard.LEFT:

{

gotoAndStop ('Center')

break;

}

Case Keyboard.RIGHT:

{

gotoAndStop ('left')

break;

}

}

}

You must remove the earphone prior actions such as:

Stop();

stage.addEventListener (KeyboardEvent.KEY_DOWN, f1_KeyDownHandler_1);

function f1_KeyDownHandler_1(event:KeyboardEvent):void
{

switch (event.keyCode)
{

case Keyboard.LEFT:

{
stage.removeEventListener (KeyboardEvent.KEY_DOWN, f1_KeyDownHandler_1);
gotoAndStop ('Center');
   
break;

};

case Keyboard.RIGHT:

{
stage.removeEventListener (KeyboardEvent.KEY_DOWN, f1_KeyDownHandler_1);
gotoAndStop ('left');

break;

}

}
}

Tags: Adobe Animate

Similar Questions

  • S205 - problem with the keyboard (right shift key)

    Hello.

    Google couldn't really help me, so I try my luck here

    Two days ago, I met a rather strange problem with the keyboard of my S205 (running Win7 64 bit). For some reason any the right shift key is no longer works as a shift key, but it has the same function as "Alt Gr" key on the right side. FYI: German keyboard. For example, the @ is on the same key as the Q here and normally I have press the AltGr key to type a @. Now the same thing with the right shift key.

    I tried a couple of things already, none of them helped. I have accidentally changed the layout of the keyboard, checked once again in the Control Panel, everything is OK here. No Fn - keys are activated. I tried to plug in an external USB keyboard - on that one, the shift key works fine. The right shift key is the only key that does not work properly. I even tried the keyboard on the screen so I could see which key was pressed when I pressed the SHIFT key and she showed the "Alt Gr" - button is pressed.

    I am open to any suggestion. Thank you

    In case someone might have the same problem - unfortunately I don't have a solution. He solved somehow itself a few months later. Really strange thing, but the key is working again.

  • Problem with password reset link - "there is a temporary problem with the service. Please try again. If you continue to receive this message, try again later. »

    Hello, account Windows Live from my wife was hacked a week ago and has been used to send many spam emails. As a result, his account has been disabled or closed (we are not sure). Whenever she asks to reset a password and a link sent to a different e-mail account, when she clicked it gets this message 'there is a temporary problem with the service. Please try again. If you continue to receive this message, try again later. "She is tried repeatedly, but get the same message. Someone knows how to go beyond that, so she can recover her account? Thank you.

    Hello BBB34,

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • How can I add an ID related when I get this message (there is a temporary problem with the service. Please try again. If you continue to receive this message, try again later.) ?

    How can I add an ID related when I get this message (there is a temporary problem with the service. Please try again. If you continue to receive this message, try again later.) ?

    Hello

    an answer your other thread

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-networking/why-do-i-keep-getting-your-Windows-Live-ID-cant-be/268ff99c-E459-E011-8dfc-68b599b31bf5?page=1&TM=1301396733390#footer

  • Strange problem with the keyboard event listener

    I have a full screen touch app. To close the application, I set an event listener on keyboard for the key "0". I don't want the press user due to some restrictions Alt + F4 key combination. Problems begin when the application loses focus. Here's the code;

    protected function onComplete(event:FlexEvent):void
    {

    this.setFocus ();
    this.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys, true, 0, true);

    }

    private void trapKeys(e:KeyboardEvent):void {}

    If (e.keyCode == 96) {}
    This.Close ();
    }

    Else if (e.keyCode == 48) {}
    This.Close ();
    }

    }

    When the user change the screen to a different with Alt + TAB application, or any other combination of keys flex app loses focus and does not work when he turns back to my app "0". How can I solve this problem?

    Thanks in advance.

    Hi, Ahmed.

    I have absolutely no problem with the solution you are trying to set up - you use mode full-screen interactive mode of keyboard?

    Please consider:

    on full add keyboard listener

    protected function applicationCompleteHandler(event:FlexEvent):void

    {

    this.stage.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    };

    //

    protected function applicationActivateHandler(event:AIREvent):void

    {

    If (this.stage)

    {

    switch the State to display full-screen when activated

    If (this.stage.displayState! = StageDisplayState.FULL_SCREEN_INTERACTIVE)

    {

    this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    };

    };

    };

    //

    private var exitHandled:Boolean = false;

    on NUMBER_0 | NUMPAD_0 exit-close

    protected function trapKeys(event:KeyboardEvent):void

    {

    If ((event.keyCode is Keyboard.NUMBER_0

    || event.keyCode is Keyboard.NUMPAD_0)

    (& this.exitHandled == false)

    {

    exitHandled = true;

    this.stage.removeEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    This.Close ();

    };

    }

    (Note: applicaton of the events 'applicatonComplete' and "applicationActivate" are routed to over managers)

    Kind regards

    Peter

  • Satellite A135 - problems with the keyboard

    Hello

    I've got aSatellite A135 - s4527 with windows XP SP3 on it.
    I was looking for the solution go PowerSaver work normally. I upgraded the BIOS to v 1.6 for a 1.7 last.
    Now I have trouble with the keyboard. It is not enough. Also, I do not know how bios rollback :(

    Can someone help me please?
    Thanks in advance

    Hello Mikachi

    Please do not be angry on me, but your ad is nothing other than chaotic.
    Initially I don't understand what you mean with normally get jobs to save energy? Normally?
    How it works on your laptop?
    For problems with tools or utilities do not update the BIOS.

    Back to the keyboard. What kind of difficulties do you have?
    Give us more information please. What exactly happens?

  • Problem with the keyboard and audio on Satellite L40

    Hello world
    I just installed XP SP2 on my Satellite L40 (BTW thanks to all of you who helped me overcome the problems during this operation with your son), but I have a problem with my keyboard. I have a QWERTY keyboard and after I installed xp, he worked as a qwerty, I fixed it, now all my letters are working very well, but I have some problems with certain symbols, such as @,., _, if you understand me.

    Could someone help me?

    I also have problems with my audio, in fact I have no sound at all, in the Panel, he said that there is no audio device found.
    I've seen a few threads which said that I should first install kb888111 and another thing is likely, but I can't find the other. I downloaded the audio driver from the toshiba Web site; Thank you for helping me in this area also.

    Good bye

    I have the same problem with the sound... I found hotfix kb888111 and I instaled this one... but when I tried to start installing driver sound a window popup say thet there is an error and cannot continue with the installation driver...
    I found hotfix kb888111 in this file that i have downloaded from the toshiba site: english\sound driver\mshdqfe\win2k_xp\us\kb888111xps2...
    I don't know what to do... Someone else knows...

  • Problems with the keyboard navigation

    I try to use the caret browsing most of the time or all the time, but I have several questions. (So please don't tell me how to disable the keyboard navigation). Also, I would like to use the keyboard navigation without also having to use the mouse - I need now for most to overcome what I think is problems.

    The problems are:

    (1) switching to a page where already in accent circumflex mode requires using the mouse to move the focus somewhere before the caret navigation is logical. I tried the wrapper work using the search text or tab, but it's the two unrelible and against nature (even tedious).

    (2) while in insert mode I sometimes loose site of the cursor. I can continue to use the arrows until starts it page scroll which tells that the caret is on the top edge or lower, but I still don't see it.

    (3) while scrolling with arrows, cursor/caret hits a link or a title then re-use of the fl arrows increment lines at this level "indentation", without going through whole paragraphs of text. I need to use the mouse to reset the caret a text box.

    (4) I think it's the same problem as above, but I enter a mode where the up and down arrows take me to top/bottom of the page rather than up/down line as it should.

    (5) the cursor becomes more a region on the side of the page (such as a navigation bar), and there seems to be no way the mouse-less to get the cursor to the text box.

    (6) it seems (but I'm not positive of what really happens) after scrolling to the bottom of the page not in insert mode, I switch to insert mode and start using the arrows but caret navigation starts from where the focus was before--as forwards several page scrolls with the space bar.

    In summary, what I expected to happen is:

    (a) I navigate to a new page in insert mode and have somewhere logical automatically set focus as in the center of the current view.

    (b) set the mode insertion while on a page - automatically have focus on the Center or other places of logic in the current view.

    (c) never increment by something other than a line upwards or downwards. Especially, do not go to navigation link or next paragraph - what ever he is doing.

    I use Firefox 24.0 on XP and have the same problems in Mode without failure.

    This is a bug.

    Firefox Bugzilla entry here.

  • Strange problem with the keyboard

    Hello.
    I have problem with my keyboard. It works with delays. I don't know how to fix it.

    Hello

    What do you mean by working with delays?
    As far as I know, you can change the keyboard settings in the keyboard properties.
    Also, if you think that it s not a fault or parameters of software problem but hardware malfunction, you can try to contact the service agent.
    But before you contact the ASP you should recover the operating system.

    Good bye

  • Problems with the keyboard on A60

    My keyboard/TouchPad has had something wrong with it majorly for the past month. He started with the TouchPad that is becoming more and more uncertain. Then one day I turned on my laptop and, after entering my password XP to go to my desktop, I was no longer able to type. Since then the keyboard was fine a few times and worked perfectly, but now he's back for does not. I'm completely confused because it allows me to type my password to Windows, so why it does not work after that?

    Hello

    It is really not easy to say what he can be, but it is obviously not a hardware problem. I read somewhere that when you try to use your Microsoft Keyboard, the computer does not meet to keyboard entries. This can happen if the MSKey Keyboard (Mskey.exe) is running on your computer. Try to quit the MSKey Keyboard tool. Check in the Manager of tasks under process if you can find it here.

  • Problem with the keyboard?

    Hello world...

    I have a problem that becomes serious with my 4 years old Satellite: 2 keys became non-responsive (most of the time). So, please, forgive what looks like typing!

    Frst supposed that there is little to dust under the keys and I decided to clean... but which looks much more serious: the rubber tip that makes the key - top pop upward, but also seems to transmit pressure to any sensor is below cracked! I guess this is the reason why my keys have become desensitized. See photo:

    http://myWeb.tiscali.co.UK/bmdtran/keyboard.jpg

    Now, I take good care of my beloved Satellite and is rather shockng that this problem can occur after a relatively short life. A that someone has experienced this problem? Someone at - it advice for me?

    Thanks in advance...

    Bruno

    Hello

    In my view, four years is a very good time with no problems, and if one or two buttons doesn't work properly I don't see it as something essential. Nothing can work forever.

    Back to your question: problem is that the repair of simple buttons is usually not possible and in those cases, the entire keyboard needs to be replaced. I can't imagine that the keyboard costs a lot of money. Believe me, the replacement of keyboard is not complicated and you can do it alone. You can also check ebay and buy a used one.

  • Problems with the keyboard

    It will not type 2 letters when I press on it.  I had to tap on the screen with keyboard to get help.  Left arrow was the other day and now it works again.  I thought I was a press that would temporarily stop his work. Help, please!

    Hello

    1. What is the brand and model of the keyboard?

    2. is it wired or wireless?

    I suggest you to follow these steps and check if that helps:

    Method 1:
    Start the computer in safe mode and check if the same problem occurs:
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Method 2:
    Try to perform the clean boot and check if it helps:
    http://support.Microsoft.com/kb/929135

    NOTE: When you are finished troubleshooting, make sure that restore you the computer mode normal startup such as suggested in step 7 of the above article.

    It will be useful.

  • Problem with the keyboard in Hotmail

    As soon as I start writing an email in Hotmail, my keyboard starts to 'stick '. The keys to refuse to answer unless they are depressed three four times! You can imagine the frustration.

    The keyboard behaves perfectly in case of 'Word' and my btinternet acount, the problem is only in Hotmail.

    I use a Dell Studio laptop.

    Any suggestions?

    Hello
     
    1. have you checked if the problem persists in a different email like Gmail or yahoo account?
     
    It seems that the problem is with Internet Explorer (IE). We recommend that you optimize the IE and check the result.
    To optimize the IE, follow the steps mentioned in this article: http://support.microsoft.com/kb/936213
     
    Try the steps and post back with the results, so that we can help you better.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
  • Problem with the keyboard on laptop NR G50-123

    My laptop is still under warranty of 1 year out of the box and now more of my keys do not work correctly, and also the buttons under the touch pad are also a little dysfunction (only work 75% of the time), I was unable to find that the warranty on my laptop and if these problems are still serviceable. At the moment I'm really short on time so I thought I'd shoot a forum message rather than deal with support at present and possibly spend a lot of time I have so any help would be greatly appreciated.

    THX

    the keyboard and the touchpad buttons that don't work are covered by the warranty, unless you spilled liquid on the unit. Call HP before warranty runs out.

  • Problem with the extended help display option for multiple displays.

    I have a laptop with an internal (#1) designated as my screen main screen. At work, I like to use the 'extended display' option for several screens to use the external desktop as #2 display monitor. However, at home I have the screen internal one on my laptop. So when I open an application like Excel at home, the window does not appear, but the application is running, as I confirmed with the Task Manager. So far, the only way I know to solve this problem at home is to change my display settings for multiple views to show on display #1 only. Is there a practical way to deal with this issue in addition to change the display settings whenever I move from work to home and vice versa?

    Hello

    In Windows 7, you can simply press the Windows Logo + P key.

    In the menu, select the item from the computer only .

    Concerning

  • Problem with the keyboard in port p/s2

    When installing a different usb mouse, I accidently deleted the keyboard of the p/s2 port cable until I turned off. Now lights all flash at the start, but after that he didn't no response of the keyboard. I tried a second keyboard p/s2 with the same result. When I go to Device Manager there is no installed keyboard and when I check the properties, there is no listed keyboard. Is it possible to check if the port works, from a command prompt, or something, as ever, I can't work around boot to enter the bios setup?

    Have you tried a USB keyboard as function of the age of the system most BIOS will support a default USB keyboard. Windows itself will be a little while (about 30 seconds) to recognize the keyboard, but he eventually set up the driver.

Maybe you are looking for

  • Satellite Pro A200 does not start

    Hello I have an A200 with XP PRO installed.After a defrag routine and restart the laptop when starting BACK gets to my page of the screensaver then made noise off closing down. No toolbar appears is just all right tomy log in page and I have to stop

  • DV6 7303ef: SD card reader does not work

    Hello, everyone, I have problem, SD card reader does not work. Laptop HP dv6 7303ef, windows 7 64 bit envy. When I don't put SD card to laptop card slot computer no response. What drivers I shoud install/reinstall or do something else? Reagardings, J

  • NEITHER 9144 with module 9862

    Hello I am currently working on a NI9144 chassis with a module CAN 9862. I was wondering if it is really necessary to use additional power to the module (as indicate in the technical data sheet) 9862 considering that I use with the 9144 chassis? Is i

  • Delete google acct of my laptop

    Hello. So, I bought this laptop for my son-in-law for the school. Whenever I go online for school of someone of another google acct rises. I think it's one of his friends. How can I remove it?

  • My printer is not working properly

    I have a WF-2540 Epson all in one printer, scanner, copier, fax.  I have tryped a letter and I tried to print it.  only partial printing!