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
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA