Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
INSIDE Macromedia Director & Lingo
Sound on/off - MCI
Vector Shapes - Create Spiral & Create Spiral Twist
Ripple General Settings-Alphamania
Accessing Keys to Control a Sprite
MUSTARD
MPEGXtra
.HLP
myExcel
Advance counter v20040306
MediaMacros Xtras Mall
 

 

 

Behavior Custom Scroll Bars

Added on 2/15/2000

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: Macromedia (website)

From Technote #13956 at Macromedia.com

property myTarget, myDirection, mySpeed
property myMinScroll, myMaxScroll, IamActive

on beginSprite me
  if myDirection = "Up" then mySpeed = -mySpeed
  myTarget = member(myTarget)
  if myTarget.type = #empty then alert "Looks like you renamed your castmembers."
  myMinScroll = 0
  myMaxScroll = charPostoloc(myTarget, myTarget.text.length).locV
end


on mouseDown me
  IamActive = TRUE
end

on prepareFrame me
  if IamActive then
    if the mouseUp then IamActive = FALSE
    newScroll = min(max(myMinScroll, myTarget.scrollTop + mySpeed), myMaxScroll)
    myTarget.scrolltop = newScroll
  end if
end

on getPropertyDescriptionList me
  theProps = [:]
  
  eligibleMembers = []
  repeat with i = 1 to the lastChannel
    case sprite(i).member.type of
      #field, #text:
      otherwise: next repeat
    end case
    if sprite(i).member.boxtype = #fixed then
      add eligibleMembers, sprite(i).member.name
    end if
  end repeat
  
  c = "Which text box to scroll?"
  addProp theProps, #myTarget, [#comment:c, #format:#string, #range: eligibleMembers, #default: 1]
  
  c = "How many pixels to scroll per frame?"
  r = [#min: 1, #max: 20]
  addProp theProps, #mySpeed, [#comment:c, #format: #integer, #range:r, #default: 2]
  
  c = "Which way does this button scroll?"
  r = ["Up", "Down"]
  addProp theProps, #myDirection, [#comment:c, #format: #string, #range:r, #default: "Down"]
  
  return theProps
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