home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 3.1 / 1997-04_Disc_3.1.iso / media / demos.dxr / 00032_Field_click.txt < prev    next >
Text File  |  1997-02-02  |  637b  |  24 lines

  1. on mouseDown
  2.   puppetSound(2) "Sound2"
  3.   ClickMe
  4. end
  5.  
  6. on ClickMe
  7.   set spriteNum = the clickOn
  8.   set offCast = the castNum of sprite spriteNum
  9.   set onCast = offCast+1
  10.   set the castNum of sprite spriteNum = onCast
  11.   updateStage
  12.   repeat while the mouseDown
  13.     scrollByLine member"zlist", -1
  14.     if (rollover(spriteNum)) then
  15.       set the castNum of sprite spriteNum = onCast
  16.     else
  17.       set the castNum of sprite spriteNum = offCast
  18.     end if
  19.     updateStage
  20.   end repeat
  21.   set the castNum of sprite spriteNum = offCast
  22.   updateStage
  23.   return (rollover(spriteNum))  -- TRUE if released on sprite
  24. end ClickMe