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

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