Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #21

    Default Keyboard Shortcuts

    Did any body tried to access the flex components at run time using key board
    shotcuts? I badly need working code or any suggestions. I perticulartly needed
    for TabNavigator and also for all most all controlers. Thanks in advance.:o

    hari_d Guest

  2. Similar Questions and Discussions

    1. keyboard shortcuts bug
      Hi, for months I live with this keyboard bug: after a while working things like CTRL+C doesn't copy but the codewindow closes and other...
    2. Keyboard shortcuts in CS?
      I have gone ahead created keyboard shortcuts in CS. I installed some new filters and somehow one of the f key functions (f1=gaussian blur) got moved...
    3. cs keyboard shortcuts
      Went to shortcut presets to find one for feather. There were two. Opt+com+D brings the dock up. I deleted that and went with shift+F6. This did...
    4. Capturing keyboard shortcuts using IE
      Are there any activex controls that will allow my web application to utilize keyboard shortcuts (ctrl-s for example) like a windows application? We...
    5. keyboard shortcuts in asp.net
      How do we write the code for Keyboard shortcuts in asp.net(c#).Is it possible through javascript only or there is any method/property availaible...
  3. #22

    Default Re: Keyboard Shortcuts

    Look in the livedocs ([url]http://livedocs.macromedia.com/flex/15/[/url]) language reference and search on 'key class'.
    fluffysocks Guest

  4. #23

    Default Re: Keyboard Shortcuts

    thank u very much for valuable info but I did get some compilation error after
    using an example code for Key class in Action Script Language Reference( pg
    #297), saying "there is no property with name '_accProps'. Do you have any idea
    about this.
    Here is my code..


    // ActionScript Document

    function initApp()
    {
    var myListener:Object = new Object();
    Key.addListener(myListener);
    myListener.onKeydown = myOnKeyDown();
    my_btn.onPress = myOnPress();

    my_btn._accProps.shortcut = "Ctrl+7";
    Accessibility.updateProperties();
    }

    function myOnKeyDown()
    {
    // 55 is key code for 7
    if(Key.isDown(Key.CONTROL) && Key.getCode() == 55)
    {
    Selection.setFocus(my_btn);
    my_btn.onPress();
    }
    }
    function myOnPress()
    {
    mx.controls.Alert.show("hello","myOnPress");
    }

    hari_d Guest

  5. #24

    Default Re: Keyboard Shortcuts

    Hi,

    I tried the above code and also get the same error although I already turned
    accessibility to true in the flex-config.xml file. And the Alert gets executed
    when the page loads, without having to press ctrl+7, how come? Please help.
    Here's my code:

    Thanks.

    --------

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" height="100%"
    backgroundColor="#FFFFFF" initialize="initApp();">
    <mx:Script>
    <!]>
    </mx:Script>
    <mx:Button id="my_btn"></mx:Button>
    </mx:Application>

    cd12 Guest

  6. #25

    Default Re: Keyboard Shortcuts

    Well, this code is wrong, you need to use an event handler all you're doing is
    setting the var my_btn.onPress to do myOnPress();

    That's why it will load when the application starts.

    if ( my_btn.onPress ) {
    my_btn.onPress = myOnPress();
    }

    Should do the trick.... it may be there's a specific value of a button you
    need to check for but you can find that in the documentation

    my_btn.onPress = myOnPress();

    AnotherInsanity Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139