![]() language grouper code snippet | show it | return | |
on activateSlide
global gTopSprite
-- sprite that is above all others for active floating
-- grab the clicked sprite number
put the clickOn into currSprite
-- put the text of the clicked sprite into our floating sprite
put the text of cast (the castNum of sprite currSprite) into field "rowX"
-- move the floating sprite to the clicked sprite's position
set the loc of sprite gTopSprite = the loc of sprite currSprite
-- push the clicked sprite off stage
set the locH of sprite currSprite = -1000
updateStage
-- script for slider movement and corresponding display
repeat while the stillDown
-- constrain vertical movement to sprite 2
set newV = constrainV( 2, the mouseV )
set the locV of sprite gTopSprite to newV
updateStage
end repeat
-- now swpa the sprites back
set the loc of sprite currSprite = the loc of sprite gTopSprite
set the locH of sprite gTopSprite = -1000
updateStage
end activateSlide
|
| The activeSlide handler is called by a mouse down on any of the 17 on screen fields that contain the words of a single language. We do a simple sprite contents and position swap to amke it appear the selected field is another color and is free to move vfreely in the vertical direction.
lingo era = v5.0 Just toss in some dot syntax and this is ready to roll into Director 7.0! |