home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (BR) Volume 3 #5 / CDRV3N5.ISO / demo / introdm.dir / Internal_38.ls < prev    next >
Encoding:
Text File  |  1996-07-12  |  2.7 KB  |  138 lines

  1. on startMovie
  2.   global CDLocation, InDemo
  3.   puppetSound(8)
  4.   cursor(200)
  5.   closeXLib()
  6.   set the mouseDownScript to "GoMenu"
  7.   set the keyDownScript to "GoMenu"
  8.   resetall()
  9.   set the soundLevel to 6
  10.   if voidp(InDemo) then
  11.     set InDemo to 1
  12.     initFIles()
  13.     if the machineType <> 256 then
  14.       openXLib("HyperPhonic")
  15.     end if
  16.   end if
  17. end
  18.  
  19. on initFIles
  20.   global SupportPath
  21.   if FileExists("INTRO.AIF") then
  22.     set SupportPath to the pathName
  23.   else
  24.     if the machineType = 256 then
  25.       set cdDrive to getCDdrive()
  26.       set SupportPath to cdDrive & ":\DEMO\"
  27.     else
  28.       set SupportPath to "Foreign Language Demo:Foreign Language Demo:"
  29.     end if
  30.   end if
  31.   set FILE to SupportPath & "CULT.MOV"
  32.   importFileInto(cast 202, FILE)
  33.   set FILE to SupportPath & "SPANSADM.MOV"
  34.   importFileInto(cast 51, FILE)
  35. end
  36.  
  37. on blankout
  38.   set FILE to "BLANK.MOV"
  39.   importFileInto(cast "CULT.MOV", FILE)
  40.   importFileInto(cast "SPANSADM.MOV", FILE)
  41. end
  42.  
  43. on FileExists name
  44.   repeat with i = 1 to the maxinteger
  45.     if getNthFileNameInFolder(the pathName, i) = name then
  46.       return 1
  47.     end if
  48.     if getNthFileNameInFolder(the pathName, i) = EMPTY then
  49.       return 0
  50.     end if
  51.   end repeat
  52. end
  53.  
  54. on stopMovie
  55.   cursor(0)
  56.   if the machineType <> 256 then
  57.     closeXLib("HyperPhonic")
  58.   end if
  59. end
  60.  
  61. on resetall
  62.   global gSpeechRecOn, soundOn, AnimationOn, cursoundlevel
  63.   clearGlobals()
  64.   closeResFile()
  65.   set gSpeechRecOn to 2
  66.   set soundOn to 1
  67.   set AnimationOn to 1
  68.   set the soundLevel to 5
  69.   set cursoundlevel to 5
  70. end
  71.  
  72. on fixColors
  73.   if (the machineType = 256) or (the colorDepth > 8) then
  74.     return 
  75.   end if
  76.   set fixpal to FixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageTop)
  77.   fixpal(mPatchIt)
  78.   fixpal(mdispose)
  79. end
  80.  
  81. on moveMouth
  82.   puppetSprite(25, 1)
  83.   set startFace to the number of member "Dealer Speaking"
  84.   set whichFace to startFace
  85.   repeat while soundBusy(1)
  86.     if whichFace = (startFace + 7) then
  87.       if random(10) = 1 then
  88.         set the visible of sprite 26 to 1
  89.       end if
  90.       set whichFace to startFace
  91.     else
  92.       set whichFace to whichFace + 1
  93.     end if
  94.     set the castNum of sprite 25 to whichFace
  95.     updateStage()
  96.     startTimer()
  97.     repeat while the timer < 8
  98.     end repeat
  99.   end repeat
  100.   set the castNum of sprite 25 to startFace
  101.   updateStage()
  102.   puppetSprite(25, 0)
  103. end
  104.  
  105. on blink num
  106.   set i to 0
  107.   set sstatus to 0
  108.   repeat while i <= 5
  109.     set the visible of sprite num to sstatus
  110.     set sstatus to not sstatus
  111.     updateStage()
  112.     swait(10000)
  113.     set i to i + 1
  114.   end repeat
  115. end
  116.  
  117. on goMenu
  118.   puppetSprite(26, 0)
  119.   ridsound()
  120.   dontPassEvent()
  121.   DoEnd()
  122. end
  123.  
  124. on ridsound
  125.   if soundBusy(1) then
  126.     sound stop 1
  127.   end if
  128.   if soundBusy(2) then
  129.     sound stop 2
  130.   end if
  131. end
  132.  
  133. on DoEnd
  134.   ridsound()
  135.   cursor(0)
  136.   go("Menu")
  137. end
  138.