home *** CD-ROM | disk | FTP | other *** search
/ Mind Games (Tessera) / MindGames.iso / mind_games / Files / mastermind.dxr / Internal_8_EnterFrameScript.ls < prev    next >
Encoding:
Text File  |  2002-11-22  |  1.0 KB  |  46 lines

  1. global gTime_spr, gxronos, gtimeFlag, gLepta, gxronos_flag, gKrataTime, gIsPaused_flag, gPoints, perase, gMiaw_flag, gPauseAllowed, thequit
  2.  
  3. on enterFrame me
  4.   gTime_spr = 29
  5.   if not gMiaw_flag then
  6.     gPauseAllowed = 1
  7.     if sprite(gTime_spr).visible = 0 then
  8.       gtimeFlag = 0
  9.     end if
  10.     if gxronos_flag = 1 then
  11.       startTimer()
  12.       gxronos_flag = 0
  13.     end if
  14.     if sprite(gTime_spr).visible = 1 then
  15.       gxronos = (the timer / 60) + gKrataTime
  16.       if gxronos = 59 then
  17.         gLepta = gLepta + 1
  18.         gKrataTime = 0
  19.         startTimer()
  20.       end if
  21.       if gxronos < 10 then
  22.         sprite(gTime_spr).member.text = string(gLepta & ":" & "0" & gxronos)
  23.       else
  24.         sprite(gTime_spr).member.text = string(gLepta & ":" & gxronos)
  25.       end if
  26.     end if
  27.     time_Flag = gxronos mod 2
  28.     if time_Flag = 1 then
  29.       if perase = 1 then
  30.         initShowPoints()
  31.         perase = 0
  32.       end if
  33.     else
  34.       perase = 1
  35.     end if
  36.   end if
  37. end
  38.  
  39. on exitFrame
  40.   CheckSound()
  41.   if thequit then
  42.     go(1, "exitMov")
  43.   end if
  44.   go(the frame)
  45. end
  46.