3 Replies - 1165 Views - Last Post: 16 June 2009 - 03:14 AM

#1 reyco1  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 20-March 05

KEY combo

Posted 20 March 2005 - 01:11 AM

Description: place ont he first frame of the movie and edit as you wishlistener which allows you to "do something" when a combination of keys (or a single key) are pressed.
someListener = new Object();
someListener.onkeydown = function() {
     if (Key.isDown(Key.CONTROL) && Key.isDown(Key.SHIFT) && Key.getCode() == 88) {
          trace("You just pressed Ctrl+Shift+x");
     }
};
Key.addListener(someListener);

Is This A Good Question/Topic? 0
  • +

Replies To: KEY combo

#2 roshan.arians  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 16-November 08

Re: KEY combo

Posted 16 November 2008 - 06:21 AM

hi....i am new to AS3 and i am not getting the difference between keycode and charcode for keyboard events can you explain this
Was This Post Helpful? 0
  • +
  • -

#3 GreenSpiral  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 64
  • Joined: 30-December 08

Re: KEY combo

Posted 03 January 2009 - 09:19 PM

Well keycode is like SHIFT CONTROL LEFT RIGHT UP and LEFT but you cannot do the letters like A B C etc. so you use the code for the letter as shown above in which X is 88. I'm no expert but I'm pretty sure thats right and I hope i answered your question
Was This Post Helpful? 0
  • +
  • -

#4 ucheboy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 16-June 09

Re: KEY combo

Posted 16 June 2009 - 03:14 AM

Hello, Great job. The whole stuff looks like film trick because I'm new to action script writing. Could you please help me to get started on the basics? Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1