Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Cinemac
DMedia
MD5
Show Me Movies
Midi
EXE Screen Saver
Clear all editable fields
3D Quad
Get Dropped Files
Media Player
MediaMacros Xtras Mall
 

 

 

Behavior Scrollable Sprites

Added on 6/7/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: PatMcClellan

For use with the Scroll Button Scroll Button, Scroll Thumb, and the Scroll Thumb Track behaviors This behavior allows the author to select direction for which the thumb (sprite) which will move when called by the ScrollButton behavior. It uses a global variable which is incremented by the ScrollButton behavior. NOTE: the motion of the sprite is opposite the direction of the scroll arrow and the scroll thumb.

property pMyRange        -- number of pixels that the sprite may move
property pMyIncrement    -- number of pixels that the thumb sprite will advance per click
property pMyStartV       -- initial locV of the thumb sprite
property pMyStartH       -- initial locH of the thumb sprite
global gScrollV          -- amount scroll has been incremented Vertically from initial value
global gScrollH          -- amount scroll has been incremented Horizontally from initial value

on getPropertyDescriptionList
  set directionList = [#HORIZONTAL, #VERTICAL]
  set p_list = [ ¬
  #pMyRange:    [ #comment:   "Range of motion (in pixels)", ¬
  #format:   #integer,¬
  #default:   100] ¬
  ]
  return p_list
end

on beginSprite me
  set pMyStartH = the locH of sprite the spriteNum of me
  set pMyStartV = the locV of sprite the spriteNum of me  
end

on setThumbH me, thumbRange, thumbSprite
  set pMyIncrement = pMyRange * 1.00/thumbRange
  set the locH of sprite the spriteNum of me = pMyStartH - integer(gScrollH * pMyIncrement)
end

on setThumbV me, thumbRange, thumbSprite
  set pMyIncrement = pMyRange * 1.00/thumbRange
  set the locV of sprite the spriteNum of me = pMyStartV - integer(gScrollV * pMyIncrement)
end

on scrollH me
  set the locH of sprite the spriteNum of me = pMyStartH - integer(gScrollH * pMyIncrement)
end

on scrollV me
  set the locV of sprite the spriteNum of me = pMyStartV - integer(gScrollV * pMyIncrement)
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail