home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 February / WPCFEB97.ISO / multi / times / data / shared.dir / 00941_gridMap.ls < prev    next >
Encoding:
Text File  |  1996-08-11  |  2.9 KB  |  84 lines

  1. on mouseDown
  2.   global whSquareH, whSquareV, moviesList, frameList, goWhere, choiceMade
  3.   set goWhere to 0
  4.   set mh to the mouseH
  5.   set mv to the mouseV
  6.   set sph to the locH of sprite the clickOn
  7.   set spv to the locV of sprite the clickOn
  8.   set unitWidth to 28
  9.   set unitHeight to 18
  10.   set offsetH to -167
  11.   set offsetV to 0
  12.   set whSquareH to (mh - sph - (offsetH - unitWidth)) / unitWidth
  13.   set whSquareV to (mv - spv - (offsetV - unitHeight)) / unitHeight
  14.   if (whSquareV <= 3) or (whSquareV = 7) then
  15.     if (whSquareV <= 2) and (whSquareH <= 0) then
  16.       set the lineSize of sprite 43 to 2
  17.       set the height of sprite 43 to (unitHeight * 2) - 1
  18.       set the width of sprite 43 to 78
  19.       set the locH of sprite 43 to sph - 248
  20.       set the locV of sprite 43 to 20
  21.       set goWhere to 1
  22.       updateStage()
  23.     end if
  24.     if (whSquareV >= 4) and (whSquareV <= 11) and (whSquareH >= 1) and (whSquareH <= 7) then
  25.       set the castNum of sprite 43 to cast "qdblue2"
  26.       set the lineSize of sprite 43 to 2
  27.       set the height of sprite 43 to unitHeight - 2
  28.       set the width of sprite 43 to unitWidth - 2
  29.       set the locH of sprite 43 to sph + (offsetH - unitWidth) + (whSquareH * unitWidth) + 1
  30.       set the locV of sprite 43 to spv + (offsetV - unitHeight) + (whSquareV * unitHeight) + 1
  31.       set goWhere to 2
  32.       updateStage()
  33.     end if
  34.     if (whSquareV >= 4) and (whSquareV <= 11) and (whSquareH < 1) then
  35.       set the castNum of sprite 43 to cast "qdblue2"
  36.       set the lineSize of sprite 43 to 2
  37.       set the height of sprite 43 to unitHeight - 2
  38.       set the width of sprite 43 to 78
  39.       set the locH of sprite 43 to sph - 248
  40.       set the locV of sprite 43 to spv + (offsetV - unitHeight) + (whSquareV * unitHeight) + 1
  41.       set goWhere to 3
  42.       updateStage()
  43.     end if
  44.     startTimer()
  45.     repeat while the timer < 20
  46.     end repeat
  47.     setOffStage("42,43")
  48.     set the castNum of sprite 41 to cast "gridIcon"
  49.     updateStage()
  50.     if goWhere = 1 then
  51.       setPuppets(1, 48, 0)
  52.       set choiceMade to 0
  53.       go(1, "topLevel.dir")
  54.     end if
  55.     if goWhere = 2 then
  56.       if choiceMade = 1 then
  57.         clearLists()
  58.       else
  59.         setOffStage("13,20,23,24,25,31,33,34,43,44,45,46")
  60.         set the castNum of sprite 40 to cast "sectionChoose"
  61.       end if
  62.       if the movieName = string(item whSquareV - 3 of moviesList) then
  63.         setPuppets(2, 12, 0)
  64.         setPuppets(15, 18, 0)
  65.         go(string(item whSquareH of frameList))
  66.       else
  67.         setPuppets(2, 12, 0)
  68.         go(string(item whSquareH of frameList), string(item whSquareV - 3 of moviesList))
  69.       end if
  70.     end if
  71.     if goWhere = 3 then
  72.       setPuppets(1, 48, 0)
  73.       set choiceMade to 0
  74.       if the movieName = string(item whSquareV - 3 of moviesList) then
  75.         go(1)
  76.       else
  77.         go(1, string(item whSquareV - 3 of moviesList))
  78.       end if
  79.     end if
  80.   else
  81.     displayMessage()
  82.   end if
  83. end
  84.