home *** CD-ROM | disk | FTP | other *** search
/ Chip Hitware 7 B / CHIP_HITWARE_7B.iso / Edukacja / Guitar Tuner / Wintun16.dxr / 00034_startMovie.ls < prev    next >
Encoding:
Text File  |  1997-04-24  |  2.9 KB  |  115 lines

  1. global gPopupObj, gVolumePopup, gLastSelected, gOperation, gStylePopup, gStyleSelectionList, gMarkPopup, gSoundLevel, gTuning, gTuningPopup
  2.  
  3. on startMovie
  4.   if the machineType = 256 then
  5.     openXLib("Popup.DLL")
  6.   else
  7.     openXLib("Popup XObject")
  8.   end if
  9.   puppetSound(0)
  10.   puppetSprite(2, 3, 12, 13, 14, 16, 17, 18, 1)
  11.   set the cursor of sprite 5 to [61, 62]
  12.   set the cursor of sprite 6 to [61, 62]
  13.   set the cursor of sprite 7 to [61, 62]
  14.   set the cursor of sprite 8 to [61, 62]
  15.   set the cursor of sprite 9 to [61, 62]
  16.   set the cursor of sprite 10 to [61, 62]
  17.   set gTuning to "standard"
  18.   put gTuning into field "tuning selection"
  19.   set gSoundLevel to the soundLevel
  20.   put gSoundLevel into field "volume selection"
  21.   setTuningPOpup()
  22.   setVolumePopup()
  23.   setVolume()
  24.   setTuning()
  25. end
  26.  
  27. on stopMovie
  28.   KillPopups()
  29.   if the machineType = 256 then
  30.     closeXLib("Popup.DLL")
  31.   else
  32.     closeXLib("Popup XObject")
  33.   end if
  34.   puppetSprite(2, 3, 12, 13, 14, 16, 17, 18, 0)
  35. end
  36.  
  37. on setVolumePopup
  38.   if objectp(gVolumePopup) then
  39.     gVolumePopup(mdispose)
  40.   end if
  41.   set gLastSelected to value(gSoundLevel)
  42.   set gVolumePopup to Popup(mnew, field "volume list")
  43.   gVolumePopup(mSetAutoMark, 1)
  44.   gVolumePopup(mSetItemMark, string(gSoundLevel + 1), 1)
  45.   gVolumePopup(mRegister, "PPXW200-3697464091")
  46.   setVolume()
  47.   updateStage()
  48. end
  49.  
  50. on setTuningPOpup
  51.   if objectp(gTuningPopup) then
  52.     gTuningPopup(mdispose)
  53.   end if
  54.   set gTuningPopup to Popup(mnew, field "tuning list")
  55.   gTuningPopup(mSetAutoMark, 1)
  56.   gTuningPopup(mSetItemMark, string(3), 1)
  57.   gTuningPopup(mRegister, "PPXW200-3697464091")
  58.   setTuning()
  59.   updateStage()
  60. end
  61.  
  62. on KillPopups
  63.   if objectp(gMarkPopup) then
  64.     gMarkPopup(mdispose)
  65.   end if
  66.   if objectp(gStylePopup) then
  67.     gStylePopup(mdispose)
  68.   end if
  69.   if objectp(gPopupObj) then
  70.     gPopupObj(mdispose)
  71.   end if
  72.   if objectp(gVolumePopup) then
  73.     gVolumePopup(mdispose)
  74.   end if
  75.   if objectp(gTuningPopup) then
  76.     gTuningPopup(mdispose)
  77.   end if
  78. end
  79.  
  80. on MakeVolSelection
  81.   set itemAlign to 0
  82.   set h to the left of sprite the clickOn + 20
  83.   set v to the bottom of sprite the clickOn - 132
  84.   set result to gVolumePopup(mPopupSpec, h, v, itemAlign)
  85.   gVolumePopup(mSetAutoMark, 1)
  86.   if result <> " " then
  87.     set gLastSelected to value(result)
  88.     put gVolumePopup(mGetItem, result) into field "volume selection"
  89.     gVolumePopup(mSetItemMark, string(gLastSelected), 1)
  90.     setVolume()
  91.     volumeUp()
  92.     updateStage()
  93.   end if
  94. end
  95.  
  96. on makeTuningSelection
  97.   set itemAlign to 0
  98.   set h to the left of sprite the clickOn + 20
  99.   set v to the bottom of sprite the clickOn - 50
  100.   set result to gTuningPopup(mPopupSpec, h, v, itemAlign)
  101.   gTuningPopup(mSetAutoMark, 1)
  102.   if result <> " " then
  103.     set gLastSelected to value(result)
  104.     put gTuningPopup(mGetItem, result) into field "tuning selection"
  105.     gTuningPopup(mSetItemMark, string(gLastSelected), 1)
  106.     setTuning()
  107.     tuningUp()
  108.     updateStage()
  109.   end if
  110. end
  111.  
  112. on closeWindow
  113.   forget(window "Tuner")
  114. end
  115.