home *** CD-ROM | disk | FTP | other *** search
/ Pro-motion 2 / PM02-Disk1.iso / mac / Parts / Main.dir / Script_6_KeyBoard.ls < prev    next >
Encoding:
Text File  |  2001-01-31  |  1.9 KB  |  86 lines

  1. global activsp, activsam, activpage, nowrate, nowtime, endtime, mode
  2.  
  3. on keyDown
  4.   if activsp = 0 then
  5.     exit
  6.   end if
  7.   mykey = the key
  8.   case mykey of
  9.     TAB:
  10.       case mode of
  11.         3:
  12.           exit
  13.         1:
  14.           if the shiftDown then
  15.             sendSprite(22, #action)
  16.           else
  17.             sendSprite(21, #action)
  18.           end if
  19.           exit
  20.         0:
  21.           if the shiftDown then
  22.             if activsam = 1 then
  23.               activpage = 6
  24.               activsp = 33
  25.               setsamname()
  26.               sendSprite(activsp, #getforcus)
  27.               exit
  28.             end if
  29.             activsp = activsp - 1
  30.             if activsp < 31 then
  31.               activsp = 48
  32.               activpage = activpage - 1
  33.               setsamname()
  34.             end if
  35.           else
  36.             if activsam = 111 then
  37.               activpage = 0
  38.               activsp = 31
  39.               setsamname()
  40.               sendSprite(activsp, #getforcus)
  41.               exit
  42.             end if
  43.             activsp = activsp + 1
  44.             if activsp > 48 then
  45.               activsp = 31
  46.               activpage = activpage + 1
  47.               setsamname()
  48.             end if
  49.           end if
  50.       end case
  51.       sendSprite(activsp, #getforcus)
  52.     RETURN:
  53.       if nowrate = 0 then
  54.         sendSprite(10, #action)
  55.       else
  56.         sendSprite(9, #action)
  57.       end if
  58.     "":
  59.       sendSprite(8, #action)
  60.     "":
  61.       sendSprite(11, #action)
  62.     "":
  63.       sendSprite(7, #action)
  64.     "":
  65.       sendSprite(12, #action)
  66.     "L":
  67.       if mode = 3 then
  68.         exit
  69.       end if
  70.       if member(1, "Sam").loop = 1 then
  71.         member(1, "Sam").loop = 0
  72.         set the member of sprite 13 to "Loop-Up"
  73.       else
  74.         member(1, "Sam").loop = 1
  75.         set the member of sprite 13 to "Loop-Down"
  76.       end if
  77.       updateStage()
  78.     "Z":
  79.       sendSprite(15, #action)
  80.     "S, C":
  81.       sendSprite(19, #action)
  82.     "Q":
  83.       sendSprite(18, #action)
  84.   end case
  85. end
  86.