macromedia.director.basics
[Top] [All Lists]

Re: keydown- keycode help

Subject: Re: keydown- keycode help
From: Mike Blaustein <mblaustein@xxxxxxxxx>
Date: Fri, 21 Dec 2007 16:53:56 -0500
Newsgroups: macromedia.director.basics


on keyDown
 case the key of
   "a","b","c":
       put "w00t!"
   RETURN,ENTER,TAB:
       put "Happy Christmas!"
   "1","2","3":
       put "Happy Channukah!"
   " ":
       put "That was a spacebar"
 end case
end

RafNeron wrote:
Hi, I want to use th "on keydown" function to, for example, pause a movie or go back to the main menu. The problem is I can't find working keycodes except RETURN. Using RETURN works in this script:

 on keyDown
   if (_key.key = RETURN) then _movie.go("start")
 end keyDown

I have try to change RETURN for SPACE or 49 (keycode for the spacebar) and it does not work.
 I hope this is clear, doing my best to write in english.
 Anybody could help please?
 Thanks


<Prev in Thread] Current Thread [Next in Thread>