home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1995 November / SHOWCASE.ISO / files / vision.dir / 00315_Script_315 < prev    next >
Text File  |  1995-06-14  |  1KB  |  28 lines

  1. global  gConstrSprite1, gBallSprite1,  gTextSprite1, gOrigTextLocV, gHiliteColor, gWindowHeight
  2.  
  3. on mouseDown
  4.   set constrainOffset = the top of sprite gConstrSprite1
  5.   set textSpriteHeight = the height of sprite gTextSprite1
  6.   set travelLength = textSpriteHeight - gWindowHeight
  7.   set the constraint of sprite gBallSprite1 = gConstrSprite1
  8.   set the castnum of sprite gBallSprite1 = ¼
  9.     the number of cast  (the name of cast(the castnum of sprite gBallSprite1) && "lit")  
  10.   
  11.   repeat while the mousedown
  12.     set the locV of sprite the clickon = the mouseV
  13.     set ballDistance = the locV of sprite gBallSprite1 - constrainOffset
  14.     set ballPer = ballDistance/float(the height of sprite gConstrSprite1)
  15.     set the locV of sprite gTextSprite1 = gOrigTextLocV - (ballPer * travelLength)
  16.     updatestage
  17.   end repeat
  18.   
  19. end mouseDown
  20.  
  21. on mouseUp
  22.   set the castnum of sprite gBallSprite1 = ¼
  23.     the number of cast  (word 1 of the name of cast(the castnum of sprite gBallSprite1)) 
  24.   updatestage
  25. end mouseUp
  26.  
  27.  
  28.