home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003: The Beautiful Scenery / enter-parhaat-2003.iso / files / Sketchy.exe / Sled.dcr / 00119_b_submitScore.ls < prev    next >
Encoding:
Text File  |  2002-12-31  |  1.2 KB  |  49 lines

  1. property pGame, pUrl, pScoreField, pScore, pScoreMod
  2. global key1, newScoreKey, gCheater, GAME_ID, CLIENT_ID
  3.  
  4. on getPropertyDescriptionList me
  5.   propList = [:]
  6.   addProp(propList, #pGame, [#comment: "Game variable: ", #format: #string, #default: EMPTY])
  7.   addProp(propList, #pUrl, [#comment: "Absolute URL to Cold Fusion script: ", #format: #string, #default: "http://"])
  8.   addProp(propList, #pScoreField, [#comment: "Score field: ", #format: #text, #default: EMPTY])
  9.   return propList
  10. end
  11.  
  12. on mouseUp me
  13.   pScore = pScoreField.text
  14.   postMe(me)
  15.   setScoreParams(me)
  16.   cursor(-1)
  17. end
  18.  
  19. on mouseDown me
  20.   puppetSound(2, "s_mouseover")
  21. end
  22.  
  23. on setScoreParams
  24.   tempScore = getScore()
  25.   pScoreMod = (tempScore + (3 * GAME_ID)) mod 13579
  26.   key2 = (4 * (pScoreMod * pScoreMod)) + (23 * pScoreMod) + (key1 * 54)
  27.   key2 = key2 mod 1000000
  28.   t = "&score=" & tempScore
  29.   t = t & "&key1=" & key1
  30.   t = t & "&key2=" & key2
  31.   return t
  32. end
  33.  
  34. on postMe me
  35.   if gCheater = 0 then
  36.     put pUrl & "gameID=" & GAME_ID & "&clientID=" & CLIENT_ID & setScoreParams(me)
  37.     gsOpenURL(pUrl & "gameID=" & GAME_ID & "&clientID=" & CLIENT_ID & setScoreParams(me))
  38.   end if
  39. end
  40.  
  41. on mouseEnter me
  42.   puppetSound(2, "s_mouseover")
  43.   cursor(280)
  44. end
  45.  
  46. on mouseLeave me
  47.   cursor(-1)
  48. end
  49.