2012-01-31 199 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 
    }); 
}