home *** CD-ROM | disk | FTP | other *** search
/ Computerworld 1996 April / Computerworld_1996-04_cd.bin / cw / demo / adamdemo / cdemo.dir / 00220.ls < prev    next >
Encoding:
Text File  |  1995-05-04  |  2.8 KB  |  128 lines

  1. on buttonMotion upstate, downstate
  2.   global delayTime
  3.   set channelnum to findChannel(upstate)
  4.   if channelnum > 0 then
  5.     puppetSprite(channelnum, 1)
  6.     set the castNum of sprite channelnum to downstate
  7.     updateStage()
  8.     repeat while the mouseDown
  9.     end repeat
  10.     set the castNum of sprite channelnum to upstate
  11.     updateStage()
  12.     puppetSprite(channelnum, 0)
  13.   end if
  14. end
  15.  
  16. on swapCast upstate, downstate
  17.   set channelnum to findChannel(upstate)
  18.   if channelnum > 0 then
  19.     puppetSprite(channelnum, 1)
  20.     set the castNum of sprite channelnum to downstate
  21.     updateStage()
  22.     puppetSprite(channelnum, 0)
  23.   end if
  24. end
  25.  
  26. on buttonAction origin8cast, startcast, endcast
  27.   set mychannel to findChannel(origin8cast)
  28.   if mychannel <> 0 then
  29.     repeat with counter = the number of cast startcast to the number of cast endcast
  30.       set the castNum of sprite mychannel to counter
  31.       repeat with delaycount = 1 to 125
  32.       end repeat
  33.       updateStage()
  34.     end repeat
  35.     set counter to the number of cast endcast
  36.     repeat while counter >= the number of cast startcast
  37.       set the castNum of sprite mychannel to counter
  38.       repeat with delaycount = 1 to 200
  39.       end repeat
  40.       updateStage()
  41.       set counter to counter - 1
  42.     end repeat
  43.     set the castNum of sprite mychannel to origin8cast
  44.     updateStage()
  45.   end if
  46. end
  47.  
  48. on buttonRange origin8cast, startcast, endcast
  49.   set mychannel to findChannel(origin8cast)
  50.   if mychannel <> 0 then
  51.     repeat with counter = the number of cast startcast to the number of cast endcast
  52.       set the castNum of sprite mychannel to counter
  53.       repeat with delaycount = 1 to 120
  54.       end repeat
  55.       updateStage()
  56.     end repeat
  57.     set counter to the number of cast endcast
  58.     repeat while counter >= the number of cast startcast
  59.       set the castNum of sprite mychannel to counter
  60.       repeat with delaycount = 1 to 90
  61.       end repeat
  62.       updateStage()
  63.       set the castNum of sprite mychannel to origin8cast
  64.       updateStage()
  65.     end repeat
  66.   end if
  67. end
  68.  
  69. on findChannel theCast
  70.   set foundIt to 0
  71.   repeat with counter = 1 to 24
  72.     if the castNum of sprite counter = theCast then
  73.       set foundIt to counter
  74.       exit repeat
  75.     end if
  76.   end repeat
  77.   return foundIt
  78. end
  79.  
  80. on Layer
  81.   puppetSound("ClickSnd")
  82.   cursor(200)
  83.   go("layer")
  84.   puppetSound(0)
  85. end
  86.  
  87. on View
  88.   puppetSound("ClickSnd")
  89.   cursor(200)
  90.   go("view")
  91.   puppetSound(0)
  92. end
  93.  
  94. on Mag
  95.   puppetSound("ClickSnd")
  96.   cursor(200)
  97.   go("mag")
  98.   puppetSound(0)
  99. end
  100.  
  101. on plr
  102.   puppetSound("ClickSnd")
  103.   cursor(200)
  104.   go("plr")
  105.   puppetSound(0)
  106. end
  107.  
  108. on CS
  109.   puppetSound("ClickSnd")
  110.   cursor(200)
  111.   go("CSMRI")
  112.   puppetSound(0)
  113. end
  114.  
  115. on isolate
  116.   puppetSound("ClickSnd")
  117.   cursor(200)
  118.   go("iso")
  119.   puppetSound(0)
  120. end
  121.  
  122. on radio
  123.   puppetSound("ClickSnd")
  124.   cursor(200)
  125.   go("radio")
  126.   puppetSound(0)
  127. end
  128.