Skip navigation
mamo1806
Currently Being Moderated

flash´ keyDown in Director

Apr 27, 2007 12:18 AM

Hi

I've been working on a project in flash where I have used keyDown commands. It works fine in actionscript. The problem is that I would like to import it into director. But my keyDowns doesn´t work in director. If I made buttons in flash it works in director. But keyDown doesn´t work. Do anyone know why it doesn´t work? I hope someone can help me.
Thank you.

mamo
 
Replies
  • Currently Being Moderated
    Apr 27, 2007 5:44 AM   in reply to mamo1806
    Be sure to click on to the Director stage when you are testing the
    movie. Director will always send key events to the currently active
    window, so if the last window you touched was not the stage, when you
    play your movie in Director, those keystrokes will go to that other
    window, even if it can't accept them.

    --
    Rob
    _______
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412-243-9119

    http://www.macromedia.com/software/trial/
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 27, 2007 11:10 AM   in reply to Newsgroup_User
    Do this:
    In your Flash movie, create a dynamic text space, place it off the
    visible area of the stage. Set the variable name to "showText".
    Add this code to your actionscript function:

    keylistener.onKeyDown = function() {
    showText = Key.getCode();

    Then re-import the new .swf into Director.

    I don't know why, but it seems that Director wants some sort of text
    action associated with keys. In any case, this will make it work.

    --
    Rob
    _______
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412-243-9119

    http://www.macromedia.com/software/trial/
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points