Disable keyboard shortcuts in the Flash authoring environment

Posted on 2006-05-03
Last Modified: 2012-05-11
I need to desabled the keyboard shortcuts that the Flash authoring environment uses for a custom UI I have created for a component. I need the enter key to act as the enter key in an input text field in my component inspector custom UI...since the Custom UI is opened in the authoring environment when you select my component on stage I guess the keyboard shorcuts apply to it as well...I know you can disable the keyboard shortcuts in test mode when you test the movie, but I cannot find the control options for the component inspector, if they even exist...maybe I just can't do this, but I can't even capture the ENTER key keypress when the movie is launched as the component inspector...any thoughts?
Question by:acekz
    LVL 3

    Expert Comment

    Gennerally the best way to capture keypress is like this:
    var myListener:Object = new Object();
    myListener.onKeyDown = function () {
          if (Key.isDown(Key.ENTER)) {
                // do something;
          } else {
                   // do something else

    NOTE, there are certain keys that aren't captures such as Print Screen.

    Author Comment

    Thanks for the input, but the question isn't about how to capture a keypress. I can do that. The question is about the enter key not adding lines in a text input field whent the flash movie is being used as a Custom UI for the component inspector for a component I created in the authoring environment...

    in the authoring environment, there are certain keys (including the ENTER key) that are captured by the authoring envronment as shortcut keys...these environment captures override anything else so the enter key does not function as it does outside the authoring environment, hence my issue.

    I need to find out a way to override these shortcut keys in my Custom UI or find out that it can't be done.
    LVL 3

    Expert Comment

    ah, sorry.  Too tired today :)  I don't believe you can disable that aspect of the IDE, at least I'ver never come across anything that allows you to do so.
    LVL 34

    Expert Comment

    by:Aneesh Chopra
    You can do it...

    When u compile an FLA in authoring tool, Flash player runs the SWF in Flash authoring tool.

    while running the SWF, check the menu "Control", it has a option in the last "Disable Keyboards Shortcuts", select it.

    Now Flash authoring tool shortcuts will be disabled while viewing compiled output, and all keyboard events will reach to the swf.


    Author Comment

    You are correct that you can do it when you test the movie. HOWEVER, I am not trying to do this.

    I have created a component that uses a Custom UI that I also created. The way this works is that I have created a .swf movie with inputs and drop-downs to replace the standard Component Instpector Interface.

    When I drag my component to the stage or select one that is already on stage, the component launches my Custom UI .swf file as the interface for the component inspector. The deal is that it is launching the .swf, but it's not in test mode so the .swf is really part of the authoring environment and therefore the keyboard shortcuts are active for that .swf as well.

    I cannot find a Control > Disable Keyboards Shortcuts option for Custom Interfaces used in the component inspector.

    ***Side note: If I test the movie that I have dropped my component into then click the Control > Disable Keyboards Shortcuts of the test movie the keyboard shortcuts ARE disabled for the authoring environment. SO, if I leave the test movie open, then move it around or re-size it to get to my component inspector, It will work as planned. HOWEVER, the point of creating a component is to make life easier for someone not as adept in Flash or to cut down time in creating reusable objects. This is not a user-friendly option at all and I can't use it.***

    I guess what I am asking about just can't be done. Someone please advise if they know differently.

    LVL 4

    Accepted Solution

    It can't be done for sure.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to how to record live broadcast.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now