home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 21 / CTROM21A.mdf / mmm / demos.dxr / 00124_mcb.ls < prev    next >
Encoding:
Text File  |  1999-09-27  |  1.2 KB  |  49 lines

  1. property theSprite, castID, castHI, castMD, target, wissel
  2. global entert
  3.  
  4. on new me, spr, csID, csHI, csMD, TA
  5.   theSprite = spr
  6.   castID = the number of member csID
  7.   castHI = the number of member csHI
  8.   castMD = the number of member csMD
  9.   target = TA
  10.   wissel = castID
  11.   puppetSprite(theSprite, 1)
  12.   return me
  13. end
  14.  
  15. on cbbtn2 me
  16.   if rollOver(theSprite) and getOne([castID, castHI, castMD], the mouseCast) then
  17.     puppetSprite(theSprite, 1)
  18.     set the castNum of sprite theSprite to castHI
  19.     updateStage()
  20.     if the mouseDown then
  21.       set the castNum of sprite theSprite to castMD
  22.       repeat while the mouseDown
  23.         if rollOver(theSprite) and the mouseDown then
  24.           set the castNum of sprite theSprite to castMD
  25.           updateStage()
  26.           next repeat
  27.         end if
  28.         set the castNum of sprite theSprite to castHI
  29.         updateStage()
  30.       end repeat
  31.       if rollOver(theSprite) = 0 then
  32.         exit
  33.       end if
  34.       entert = "<1"
  35.       go(target)
  36.       exit
  37.     end if
  38.   else
  39.     set the castNum of sprite theSprite to wissel
  40.   end if
  41. end
  42.  
  43. on setcurrentSz me, cstmd
  44.   wissel = the number of member cstmd
  45.   set the castNum of sprite theSprite to wissel
  46.   updateStage()
  47.   return me
  48. end
  49.