set the ancestor of me to new(script "btnParentScript", sS)
return me
end
on button me, whichWay
set whichSprite to the myS of me
set actNow to 0
set dnClick to "click1"
set upClick to "click2"
set playedClick to 1
set startScroll to the timer
repeat while the stillDown
if rollOver(whichSprite) then
if playedClick = 1 then
puppetSound(dnClick)
set playedClick to 0
set the memberNum of sprite whichSprite to the myDnState of me
set actNow to 1
end if
if checkScrollPosition(6, whichWay) = 0 then
if the timer < (startScroll + 180) then
set scrollAmount to 15
else
if the timer < (startScroll + 300) then
set scrollAmount to 30
else
if the timer < (startScroll + 420) then
set scrollAmount to 90
else
set scrollAmount to 150
end if
end if
end if
set newScrollPos to the scrollTop of member the memberNum of sprite 7 + (scrollAmount * whichWay)
set the scrollTop of member the memberNum of sprite sprite(7) to newScrollPos
puppetSound(dnClick)
updateStage()
if the timer < (startScroll + 420) then
wait(1)
end if
end if
else
if playedClick = 0 then
puppetSound(upClick)
set playedClick to 1
set the memberNum of sprite whichSprite to the myUpState of me
set actNow to 0
end if
end if
updateStage()
end repeat
if the memberNum of sprite whichSprite = the myDnState of me then
set the memberNum of sprite whichSprite to the myUpState of me
puppetSound(upClick)
updateStage()
end if
end
on checkScrollPosition textBlockS, whichWay
set theHeightOfOneLine to 15
if ((the scrollTop of member the memberNum of sprite 7 + theHeightOfOneLine) >= the height of member the memberNum of sprite 7) and (whichWay = 1) then
return 1
else
if (the scrollTop of member the memberNum of sprite 7 <= 0) and (whichWay = -1) then