home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1997 March / Image.iso / wd.dxr / Wettauswahl_69_WettauswahlMain.ls < prev    next >
Encoding:
Text File  |  1996-10-28  |  1.5 KB  |  63 lines

  1. global gVideoPath
  2.  
  3. on SetBetVideo nr
  4.   global gLastBetVideo
  5.   if voidp(nr) then
  6.     set nr to gLastBetVideo
  7.   end if
  8.   set gLastBetVideo to nr
  9.   set fname to the fileName of cast "WettVideo"
  10.   if nr < 10 then
  11.     set fname to "0" & nr
  12.   else
  13.     set fname to string(nr)
  14.   end if
  15.   set fname to gVideoPath & "Wette" & fname & ".avi"
  16.   if fname <> the fileName of cast "WettVideo" then
  17.     set the fileName of cast "WettVideo" to fname
  18.     preLoadCast("WettVideo")
  19.   end if
  20. end
  21.  
  22. on StopBetVideo
  23.   set the movieTime of sprite 36 to 1
  24.   set the movieRate of sprite 36 to 0
  25.   set the visible of sprite 25 to 0
  26.   set the visible of sprite 26 to 0
  27.   SpriteCursor([36, 37], ["CursorFinger", "CursorFingerMask"])
  28.   SpriteCursor(38, 0)
  29. end
  30.  
  31. on KickBetVideo
  32.   set the visible of sprite 25 to 0
  33.   set the visible of sprite 26 to 0
  34.   set the visible of sprite 36 to 0
  35.   set the movieRate of sprite 36 to 0
  36.   set the movieTime of sprite 36 to 1
  37.   SpriteCursor([36, 37, 38], 0)
  38.   unLoad("WettVideo")
  39.   set the fileName of cast "WettVideo" to "QuickVid\dummy.avi"
  40. end
  41.  
  42. on wettnr klick
  43.   return ((the frame - label("Seitenauswahl")) * 4) + klick
  44. end
  45.  
  46. on Wettseite nr
  47.   global gWetten, gHighScores, gNoPlayers
  48.   KickBetVideo()
  49.   repeat with i in [3, 4, 5, 6]
  50.     set the visible of sprite i to 0
  51.   end repeat
  52.   updateStage()
  53.   go(nr)
  54.   repeat with i in [25, 26, 36]
  55.     set the visible of sprite i to 0
  56.   end repeat
  57.   repeat with i = 1 to 4
  58.     set the visible of sprite (20 + i) to getOne(gWetten, wettnr(i)) > 0
  59.   end repeat
  60.   SpriteCursor([36, 37, 38], 0)
  61.   updateStage()
  62. end
  63.