2012-01-31 104 views
0

我想将文本放在一个块中,并设计一个自定义滚动条来滚动该块中的文本。 (虽然不会永远滚动,而且我希望文本可以轻松滚动。)Flash自定义滚动条

+0

你的意思是 '宽松'? – 2012-01-31 11:21:29

+0

是啊,就像..当人们会滚动,我想文本移动起初,但然后有点慢下来,直到它停止,是啊,我猜easing :) – Radicate 2012-01-31 13:02:21

回答

1

听起来像想要制作放松的动画。查看TweenMax。这是AS2和AS3的一个很好的补间库。这里有很多,但这是一个受欢迎的。

http://www.greensock.com/

它可以让你补间的事情,像这样(AS3为例):

//Scroll the textBox upward when the user clicks the scrollDownButton 
function onScrollDownButtonClick(e:MouseEvent):void 
{ 
    //TweenMax.to(objectToTween, tweenDurationInSeconds, tweenArguments); 
    TweenMax.to(textBox, 0.5, { 
    //Tween properties on the textBox like the y position 
    y: textBox.y - 50, 

    //Specify easing through an Easing class, which has methods to: 
    //easeIn, easeOut, and easeInOut (these are packaged with TweenMax) 
    ease: Expo.easeOut 
    }); 
}