home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM da Folhinha / cdrom-folhinha.ISO / hq.dir / 00019.ls < prev    next >
Encoding:
Text File  |  1997-04-07  |  3.0 KB  |  101 lines

  1. on mouseDown
  2.   global funds, possivel, balao, barratexto
  3.   if barratexto = 99 then
  4.     voltatexto()
  5.   end if
  6.   if balao = 1 then
  7.     set balao to 0
  8.     set the locV of sprite 37 to -1000
  9.   end if
  10.   if the locV of sprite 37 = 240 then
  11.     set the locV of sprite 37 to -1000
  12.     updateStage()
  13.   end if
  14.   puppetSound("arrasta")
  15.   set funds to the clickOn
  16.   set spr to the clickOn
  17.   set rr to the castNum of sprite spr
  18.   set the castNum of sprite 48 to rr
  19.   set the height of sprite 48 to the height of member rr
  20.   set the width of sprite 48 to the width of member rr
  21.   set the locV of sprite 48 to the locV of sprite spr
  22.   set the locH of sprite 48 to the locH of sprite spr
  23.   set the locV of sprite spr to -1000
  24.   arruma(spr - 12)
  25.   updateStage()
  26.   repeat while the mouseDown
  27.     set mv to the mouseV
  28.     set mh to the mouseH
  29.     set the locV of sprite 48 to mv
  30.     set the locH of sprite 48 to mh
  31.     updateStage()
  32.   end repeat
  33. end
  34.  
  35. on mouseUp
  36.   global opcao, linha, coluna, desenho, ozzy, conta, funds, possivel
  37.   if funds = the clickOn then
  38.     set funds to 0
  39.     set st to the top of sprite 48
  40.     set sb to the bottom of sprite 48
  41.     set sl to the left of sprite 48
  42.     set sr to the right of sprite 48
  43.     set mv to the locV of sprite 48
  44.     set mh to the locH of sprite 48
  45.     set cas to the castNum of sprite 48
  46.     set hei to the height of member cas
  47.     set wid to the width of member cas
  48.     if (mv < 67) or (mv > 242) then
  49.       varia(48, mv, mh, 376, 97)
  50.       set the locV of sprite 48 to -1000
  51.       updateStage()
  52.     else
  53.       if sb > 226 then
  54.         spriteBox(48, sprlef(48), 227 - hei, sprrig(48), 226)
  55.         updateStage()
  56.       end if
  57.       if st < 87 then
  58.         spriteBox(48, sprlef(48), 87, sprrig(48), 87 + hei)
  59.         updateStage()
  60.       end if
  61.       if sl < 16 then
  62.         spriteBox(48, 16, sprtop(48), 16 + wid, sprbot(48))
  63.         updateStage()
  64.       end if
  65.       if sr > 625 then
  66.         spriteBox(48, 625 - wid, sprtop(48), 625, sprbot(48))
  67.         updateStage()
  68.       end if
  69.       if (sr > 210) and (mh <= 218) then
  70.         spriteBox(48, 215 - wid, sprtop(48), 215, sprbot(48))
  71.         updateStage()
  72.       end if
  73.       if (sl < 215) and (mh > 218) then
  74.         spriteBox(48, 221, sprtop(48), 221 + wid, sprbot(48))
  75.         updateStage()
  76.       end if
  77.       if (sr > 415) and (mh <= 423) then
  78.         spriteBox(48, 420 - wid, sprtop(48), 420, sprbot(48))
  79.         updateStage()
  80.       end if
  81.       if (sl < 420) and (mh > 423) then
  82.         spriteBox(48, 426, sprtop(48), 426 + wid, sprbot(48))
  83.         updateStage()
  84.       end if
  85.       set conta to conta + 1
  86.       if conta = 24 then
  87.         set possivel to 0
  88.       end if
  89.       set cc to the castNum of sprite 48
  90.       set cv to the locV of sprite 48
  91.       set ch to the locH of sprite 48
  92.       setAt(ozzy, conta, cv)
  93.       set the locV of sprite (12 + conta) to cv
  94.       set the locH of sprite (12 + conta) to ch
  95.       set the memberNum of sprite (12 + conta) to cc
  96.       set the locV of sprite 48 to -1000
  97.       updateStage()
  98.     end if
  99.   end if
  100. end
  101.