Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Anatomy of an Alpha Channel
Update text member from remote file
Sarah"s Multiuser Pages
Display Mode
Custom Scroll Bars
Get Member Modified Time and Date
RoboDemo Review
rescale
PrintOmatic lite behavior
Thumbnail Browser
MediaMacros Xtras Mall
 

 

 

Behavior Scroll Thumb Track

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 Scrollable Sprites behaviors This behavior allows the author to select direction for the thumb-track (horz or vert). When applied, it allows the user to click anywhere in the track to advance the thumb in large increments toward the mouse click spot.

property pMyDirection    -- options are Horizontal and Vertical
property pMyIncrement    -- number of pixels that the thumb sprite will advance per click
property pThumbSprite    -- the sprite number for the scroll thumb
property pThumbRange     -- the range of motion for 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 = [ ¬
  #pMyDirection:   [ #comment:   "Direction of Slider Track", ¬
  #format:   #symbol, ¬
  #range:    directionList,¬
  #default:   #VERTICAL], ¬
  #pMyIncrement:   [ #comment:   "Incremental change per click (in pixels)", ¬
  #format:   #integer,¬
  #default:   100] ¬
  ]
  return p_list
end

on setThumbV me, range, thumbSprite
  set pThumbRange = range
  set pThumbSprite = thumbSprite
end

on setThumbH me, range, thumbsprite  
  set pThumbRange = range
  set pThumbSprite = thumbSprite
end

on mouseDown me
  if pMyDirection = #VERTICAL then
    if the locV of sprite pThumbSprite < the mouseV then
      set gScrollV = min (pThumbRange, gScrollV + pMyIncrement)
    else
      set gScrollV = max (0, gScrollV - pMyIncrement)
    end if
    sendSprite (pThumbSprite, #scrollThumbV)
    sendAllSprites (#scrollV)
  else
    if the locH of sprite pThumbSprite < the mouseH then
      set gScrollH = min (pThumbRange, gScrollH + pMyIncrement)
    else
      set gScrollH = max (0, gScrollH - pMyIncrement)
    end if
    sendSprite (pThumbSprite, #scrollThumbH)
    sendAllSprites (#scrollH)
  end if
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