home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / cngrkpl.dir / 00119_Script_initializeGoldenGame < prev    next >
Text File  |  1996-05-30  |  1KB  |  49 lines

  1. -- ---------------------------------------------------------------
  2. -- Handler initializeGoldenGame 
  3.  
  4. on initializeGoldenGame
  5.   global outline, firstPlacedOutline, numOutlines
  6.   global currentPlacedPiece, GSDoor, rightBulb, leftBulb
  7.   global firstPlacedOutline, lastPlacedOutline, totalPieces,totalPlaced
  8.   set numOutlines = 10
  9.   set totalPieces =19
  10.   set outline = 6
  11.   set firstPlacedOutline = 7
  12.   set lastPlacedOutline = firstPlacedOutline + numOutlines - 1
  13.   set GSDoor = 17
  14.   set rightBulb = 4
  15.   set leftBulb = 5
  16.   set totalPlaced = 0
  17.   
  18.   initializeCurrentPlacedPiece
  19.   
  20.   puppetSprite outline, TRUE
  21.   puppetSprite rightBulb, TRUE
  22.   puppetSprite leftBulb, TRUE
  23.   
  24.   repeat with i = firstPlacedOutline to lastPlacedOutline
  25.     puppetSprite i, TRUE
  26.   end repeat
  27.   
  28.   --  global fingerCursor
  29.   --  set the cursor of sprite outline = fingerCursor
  30.   
  31.   global goldenSectionInfo
  32.   set goldenSectionInfo = field "goldenSection locations"
  33.   
  34.   global outlineH, outlineV
  35.   set outlineH = the locH of sprite outline
  36.   set outlineV = the locV of sprite outline
  37.   
  38.   global placedGoldenSectionsList, GSFrame1PlacedList, GSFrame2PlacedList
  39.   set placedGoldenSectionsList = []
  40.   set GSFrame1PlacedList = []
  41.   set GSFrame2PlacedList = []
  42.   
  43.   put "0" into field "score"
  44.   
  45.   when mouseDown then dragOutline(outline, "goldenSectionInPlace", "doMatchGoldenSection")
  46. end
  47.  
  48.  
  49.