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

  1. property theSprite, castID, castHI, castMD, target, wissel
  2. global hydrolijst, 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 cbbtn me
  16.   if rollOver(theSprite) 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.       updateStage()
  23.       repeat while the mouseDown
  24.         if rollOver(theSprite) and the mouseDown then
  25.           set the castNum of sprite theSprite to castMD
  26.           updateStage()
  27.           next repeat
  28.         end if
  29.         set the castNum of sprite theSprite to castHI
  30.         updateStage()
  31.       end repeat
  32.       if rollOver(theSprite) = 0 then
  33.         exit
  34.       end if
  35.       if target = "bck" then
  36.         go(1, "main")
  37.         exit
  38.       end if
  39.       entert = "<1"
  40.       go(target)
  41.       exit
  42.     end if
  43.   else
  44.     set the castNum of sprite theSprite to wissel
  45.   end if
  46. end
  47.  
  48. on setcurrentSW me, cstmd
  49.   put cstmd
  50.   wissel = the number of member cstmd
  51.   set the castNum of sprite theSprite to wissel
  52.   updateStage()
  53.   return me
  54. end
  55.