Flash using arrow keys to move between frames in an animation

Hi,
Im currently creating a calculator on flash and I would like to be able to move to the next part of the calculator (the next frame) by using the arrow keys on my keyboard
This is my current code to move between the frames using a buttons.
stop();
var input1:String;
var input2:String;
var Res:Number;
var Quote:Number;
txtLen.restrict = "0-9"
txtWid.restrict = "0-9"
BtnCon2.addEventListener(MouseEvent.CLICK,fnCall)
function fnCall(Event:MouseEvent):void{
  input1 = txtLen.text;
  input2 = txtWid.text;
  Res = parseInt(input1) * parseInt(input2);
  Res.toString();
  gotoAndPlay(21)
  txtArea.text = String(Res);
BtnRes1.addEventListener(MouseEvent.CLICK,fnRes1)
function fnRes1(Event:MouseEvent):void{
  gotoAndPlay(1);
Im trying to do the same thing that im doing with my buttons but with my arrow keys
Thanks

Another way to write what Ned said is instead of multiple if's, you could do something like:
switch(yourEvent.keyCode) {
     case Keyboard.RIGHT:
          fnCall(null);
          break;
     case Keyboard.LEFT:
          fnRes1(null);
          break;
     case Keyboard.UP:
          //do up stuff
          break;
     case Keyboard.DOWN:
          //do down stuff
          break;
     default:
          trace('I\'m confused by this key.');
          break;
Some people find this syntax more legible.

Similar Messages

  • Alternative to arrow keys to move 1 frame left or right in timeline/viewer

    Other than punching in different timecode values, are there any other keyboard or button shortcuts that will move the timeline or viewer playhead 1 frame backwards or forwards WITHOUT using the left/right arrow keys?

    That's a handy tip Andy, though I don't know whether it's any quicker than the arrow keys as you have to position the cursor in the playhead track of the timeline.
    On a Logitech mouse it was perfect but the wheel on my Mighty Mouse is much too sensitive and fiddly to make it a pleasurable experience.

  • Using Arrow Keys to Move Pointer - Mouse Keys?

    Hello, I am trying to use Universal Access on a new MacBook Pro.
    Ideally, I would like to move the screen pointer by holding the function key (or some command type key) and the directional arrows - instead of using the mouse. Is there a way to map the keys to do this?
    I tried to turn on Universal Access and turning on Mouse Keys, but there are no instructions in the Help section that tell you which keys move in what directions. Anyhow, after confirming that it was on, no keys would move the pointer or do any mouse functions.
    Thank you!

    Hello Saksiri-san,
    Mouse Keys are controlled by the numeric keys which form a secondary keypad in the block: J->1, K->2, L->3, ;->-, U->4, I->5, O->6, P->*, 7->7, 8->8, 9->9, 0->/. M gives 0 and / gives +, all on an English-language keyboard of course. The movement is U or 4 to the left, O or 6 to the right and so on. The I or 5 key gives the mouse click.
    Once Mouse Keys are on, you will normally need to use the fn key as well as those in the secondary numeric keypad to move the mouse. This can be avoided by setting the default option to "software functions" in the Keyboard tab of the Keyboard and Mouse pane of System Preferences.
    HTH
    Archie

  • Can't use arrow keys to move cursor around TextArea after upgrading to 1.4

    Hi,
    I saw that there have been similar posts, but none are exactly the same nor have they solved my problem...
    I've got an older Java application that has been around for many years,
    the only updates to it essentially being upgrading the version of the
    JDK. So far, upgrading the JDK hasn't caused any issues. However, after upgrading to JDK 1.4, I can no longer use the arrow keys on the
    keyboard to move the cursor within a TextArea. You can use the mouse to highlight and you can use the rest of the keys (i.e. type in text,
    delete stuff, etc.) but somehow you just can't move the cursor around
    by using the keyboard. Does anybody have any suggestions on what I
    could do to solve this? Thanks in advance!

    Didn't get any replies/comments, but in case anybody is interested, I took the easy way out and upated the TextArea to a JTextArea and the problem went away.

  • Why can I no longer use arrow keys to go between tabs?

    I recently got a new Windows 7 computer and have Firefox 3.6.10 installed on it. On my old computer I used to be able to double click the tabs so that they got a little "box" around the text (telling me it was selected) and then used the arrow keys to go back and forth between the tabs.
    I liked doing it this way as that left a free hand to be able to close any tabs I didn't want open at the same time (unlike similar functions such as Ctrl + Page Up/Down which take two hands to operate) -- does anyone know if I can fix this? I read that pressing F7 might solve the problem, but that didn't seem to change anything.

    In Firefox 3.5 and later you can no longer click the Tab bar to set focus to it.<br />
    You can press Ctrl+K (Mac: Cmd+K) to set focus to the search bar and press the Tab key until the tab bar gets focus.
    See dao's post in this MozillaZine forum thread: http://forums.mozillazine.org/viewtopic.php?f=23&t=1304895
    Add code to [http://kb.mozillazine.org/UserChrome.css userChrome.css] below the @namespace line.<br />
    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files
    <pre><nowiki>.tabbrowser-tab[selected="true"] {-moz-user-focus: normal !important;}</nowiki></pre>

  • Cannot use arrow keys to move an object in illustrator

    Can anyone tell me how to fix this?  Thanks!

    Is the object locked? If it's locked, then you can't even select it.
    If you can select it and it still won't move with arrows (I'm assuming it moves when you drag it), then perhaps the arrow "nudge" setting is so small it's not visible. Go to Edit > Preferences and look at "General" (the first page of settings. Make sure Keyboard Increment is set to something big enough to be useful.
    If all else fails, you might try exiting Illustrator and rebooting.

  • Using arrow key to move down Event list bug

    1. I have my event window in List mode.
    2. I'm moving down the list with the DOWN ARROW button.
    3. I have a clip selected and the clip name turns blue.
    4. I take the cursor and skim the clip preview at the top. FCP X makes the name of the clip gray instead of blue.
    5. I press the DOWN ARROW button again.
    6. FCP X selects an arbitrary clip and not the next clip in the list.
    So just open up an event with a lot of clips in LIST VIEW and sort anyway you want, select a clip, skim the clip preview at the top, the clip name in the list becomes gray, then press DOWN ARROW multiple times and see it jump between what seems like arbitrary clips.
    I can't figure out the logic of how it's selecting the clips as I press DOWN ARROW.
    So what I have to do is skim the preview, then mouse down to the grayed out name and click on it with the mouse, then press DOWN ARROW, etc.
    So, basically, the UP/DOWN ARROW buttons are useless in LIST VIEW because I might as well just click on the next clip with the mouse.
    Thanks for your time.

    Tom Wolsky wrote:
    Yes, the clip goes gray. The down arrow takes me to the next clip in the list.
    Thanks, Tom.
    OK, so what I'm seeing is it sometimes works fine, other times it acts as I've described.
    I noticed that when I change the sort from DURATION to NAME, etc., it seems to trigger the behavior I'm describing. See if changing events and then selecting, skimming, then changing the sort by clicking on the column triggers it for you.
    This behavior happens with the event window in the main window or on my second monitor.
    Thank you for your time, Tom.

  • How do I browse through pictures (in open state) using arrow keys

    Hi all. I know this is a lame question. But I am new to Mac. How do we navigate through photos in open mode. I mean usually in Windows, we open one picture and use arrow keys to navigate between photos.What are the keys I can use to navigate between photos. As of now, I have to close the photo and then double tap on another to view it. Thanks.

    What application are you using? In iPhoto you can just use the right and left arrow keys to browse photos...
    Clinton

  • Down one row using arrow keys

    Is FrameMaker capable of navigating up/down one row by using the arrow keys? This seems such a basic functionality but I can't do it? I'm using v7.0 (the company is cheap and won't upgrade).  Alternately, is there a third party keyboard utility to get around this limitation?

    No need to use a plug-in or scripting language, or to use the existing shortcuts if you prefer something else. FrameMaker shortcuts and menus can be customized to your convenience.
    For details, see the "Customizing Frame Products" manual. In 7.0, this PDF book is in the $FMHOME\OnlineDocuments where $FMHOME is your main FrameMaker directory, probably something like c:\Program Files\Adobe\FrameMaker7.0.
    While you can use a different file, one way to make your change is to create or edit $FMHOME\fminit\configui\customui.cfg. This is a plain text file that you can edit with Notepad or any other plain text editor (if you use FrameMaker make sure to save the file as text and put the filename in quotes in the Save As dialog box so that FrameMaker does not assign a .txt extension).
    Suppose you want to use the up and down arrow keys to move up and down one cell. You probably do not want to disable the usual functionality assigned to those keys--moving up and down a line in text. You might therefore want to use Shift-Up Arrow and Shift-Down Arrow. In customui.cfg all you need is:
    <Modify MoveIPToCellAbove
      <KeySequence +/Up>
    >
    <Modify MoveIPToCellBelow
      <KeySequence +/Down>
    >
    Here, + indicates use of the Shift key.

  • Bridge CC crashes while using arrow keys to switch images

    Adobe Photoshop CC 2014 Adobe Bridge 2014 on Mac is crashing every time I press an arrow key to move through images in bridge. I can click to manually select images with no problem, but using the up/down arrow keys to move to the next image up/down brings up the spinning beach ball and immediately locks the program up, requiring a force quit.
    Did the usual Mac permissions and fsck stuff to no avail. Ideas?
    Dan

    Thanks for moving my post to this correct forum. (I'm afraid I missed it when I originally posted.) A bit more information based on attempts to fix and on further attempts to use the program.
    After launching Bridge — before I select any specific image — it initially seems to work correctly. For example, I can use menu items and select and open folders. However...
    Once I drill down through folders to show raw files in the browser the problems begin. I can manually select an image by clicking on it, but the program the locks up if I do things such as attempt to navigate to another image using the up/down keyboard arrows or select anything from a menu that would perform an action on the image. (The problem happens with any image selected — not one particular image, and with images that worked fine until 48 hours ago.)
    ACR still works. I can double click an image and open the raw converter, and I can doubly click a smart object image in Photoshop do go back to the raw editor and it allows me to edit.
    I did the step of holding down command-option-shift at Bridge startup and selecting all three options to delete the cache and so forth. Still no joy.
    I did the usual Mac disk/file system repair stuff — repairing permissions and repairing disk — to no avail.
    I downloaded and reinstalled Bridge but the problem persists.
    Since I have a full backup of the drive on which Bridge is installed and since this backup drive is bootable, I double clicked the copy of Bridge on the backup drive... and it opened (slowly!) but worked correctly. (Not that this means much, but my second instance on my laptop continues to run fine.)
    I'm stuck, in a serious way, at this point. Thoughts?
    Thanks,
    Dan

  • After zooming in on an object using arrow keys to nudge, it crashes most of the time

    After zooming in on an object, using arrow keys to nudge, it crashes most of the time.
    Versions:
    Illustrator CS6, latest update
    Mac OS X 10.9.4
    FontAgent Pro 6.2
    Troubleshooting I've tried
    -trashed all related Illus. preferences
    -updated the only plug-in being used (FontAgent Pro), to the latest
    -disabled all but absolutely necessary fonts
    -repaired both system and user permissions
    -quit all other apps, so that only Illus. running.
    -fonts verified
    Was never a problem until a couple weeks ago, so the obvious question is "what changed?".  The two things we changed in the time period that the crashing started, is we replaced a balky external drive with a new one, and started our TimeMachine backups over again. And #2, we updated to the latest CS6 versions (due to other quirky issues).
    One odd thing to point out...perhaps is "normal", but in the crash reports, it's reporting that Illustrator is 16.0.0, but "About Illustrator" shows that it's 16.2.2.
    Everything else running fine on this iMac -- no reason to suspect it's the operating system.
    Has anyone run into this bug? If so, what have you done to fix this?
    I've not seen anything like this mentioned in Adobe's update change logs or their troubleshooting info.

    -> go to View Menu -> Toolbars -> select "Navigation Toolbar"
    -> go to View Menu -> Zoom -> click "Reset"
    -> go to View Menu -> Page Style -> select "Basic Page Style"
    -> go Tools Menu -> Clear Recent History -> Time range to clear: select EVERYTHING -> click Details (small arrow) button -> place Checkmarks on ALL Options -> click "Clear Now"
    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE any Unwanted/Suspicious Extension (add-ons) -> Restart Firefox
    You can enable the Trustworthy Add-ons later. Check and tell if its working.

  • Acrobat X Pro 10.1.12 under Yosemite crashes when trying to use arrow keys to navigate.

    Acrobat X Pro 10.1.12 Mac
    Yosemite OS X 10.10.1
    Acrobat now crashes when attempting to use arrow keys to navigate. This is true on both MacBook Pro 15 retina and Mac Pro.

    I ended up upgrading to Acrobat XI. This works, but Adobe is up to its old tricks changing the interface from what we're used to using. They now have decided to hide all the tools. You have to delve deep into the program to find the tools, then set up your own tool menus. Lord help you finding a tool that you use too occasionally to put on a custom menu.
    Adobe has been doing this for years now. In Photoshop of olden days, it was simple to set up a brush, say, that you used frequently. Quite a few updates ago they made that vastly more difficult. And they've replaced words with happy little icons, that are not at all intuitive to use. I challenge you, too, to look at the icon for the airbrush and tell me whether it is on or off. (Sorry, this is mainly about Photoshop, but what they've done to the latest Acrobat is just as bad.)
    Of course, their ultimate cuteness in making things difficult for the user is their essential abandonment of a Help system. You can't do a simple look-up of a function -- you have to go to an internet site and sort through a bunch of forums and user comments to get any information.
    JEEZ Adobe!

  • BI web use ARROW Keys

    Hello Everyone,
    I am in process of moving planning from Excel to IP with one of my client. Client wants to use ARROW keys to scroll left and right on layout beside using TAB.
    Can anyone help on this if you are aware how to add this functionality in BI Web ??
    Regards,
    Jasmi

    Daniel,
    I am assigning you points for your answer in other forum thread "Input functionality".
    We have one more requirement, when entering data, system should prompt "SAVE DATA" if user tries to navigate to other screen or close browser by mistake. Is it possible, if by any chance you are aware about it ??
    Also is it possible to copy same value across entire layout row / distribute equally by any button or function as we have layout for 24 months ??
    Regards,
    Jasmi

  • JComboBox problem when traversing using arrow keys and it is editable

    Hello,
    The JComboBox I am using is editable and user needs to traverse the list using arrow keys as long as user is not selecting a particular item. But this is not achievable when combobox is editable. Any suggestion to get rid of that.
    regards,
    Ranjan

    Huh?import java.awt.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JComboBox jcb = new JComboBox(new String[] {"One","Two","Three"});
        jcb.setEditable(true);
        content.add(jcb, BorderLayout.NORTH);
        setSize(100,100);
      public static void main(String[] args) { new Test3().setVisible(true); }
    }

  • Using the arrow keys to move objects in photoshop issue

    When I move objects around in Photoshop using the arrow keys something odd to me happens.  When I press the left arrow key it seems to move 2 pixels then when I press the right arrow key it seems like it moves 1 pixel.  I noticed this when I had 3 objects.  One was centered and I wanted to move both the other objects 20 pixels away.  One looked twice as far away.  I looked closer and I found out that was the problem.  This also happens when using the up and down arrow keys.  Is that supposed to happen and is there a way to fix it? Thanks

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, such as total installed RAM, scratch file HDs, video card specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Görtzel filter implementation in LabVIEW?

    Hi. I am looking for a simple VI with an implementation of a Görtzel algorithm. Since I am not a signal processing wiz. I would like to know if someone in here have a VI in the desk drawer with a just this implementation? Thanks. Best regards Jens Ch

  • Analysing tools for KM documents

    Hello, Does anybody know, if there are any analysing tools available, with which you can analyse the access of the KM documents. They should answer questions like - when was the last access to a documents? - which documents have an average rating low

  • Regarding the Query Creation Date

    Dear All, How Can I find the creation date of querries which I have done in query designer. Is there any Infoobject keeping track of this data (SAP DEFINED). Pls post msg as soon as possible.

  • Can GG SQL Server DataPump Process run on separate server to Extract

    Its clear from the Goldengate SQL Server documentation that the Extract process for SQL Server has to be on the database server. Is it possible to split the Data Pump off onto a separate server in order to limit the load on the DB Server? It seems li

  • Japanese Input (Kotoeri)

    Hello, I'm using the Japanese input (Kotoeri) on MacOSX configured with French as main language. My keyboard is a Japanese keyboard. It just so happens that regularly (once a month), the keyboard mapping stubbornly switches to AZERTY in Romaji mode.