|
| |
精品推荐 |
 |
|
| |
|
|
|
|
Flash AS3:动态文本滚动条
|
日期:2008年3月21日 作者: 查看:[大字体
中字体 小字体]
|
} pole_sprite.y = nowPosition;
scrollText.scrollV = (scrollText.maxScrollV - 1) * (nowPosition - poleStartY) / totalPixels + 2; var unitPixels : Number = totalPixels / (scrollText.maxScrollV - 1); if((nowPosition - poleStartY) < unitPixels) { scrollText.scrollV = (scrollText.maxScrollV - 1) * (nowPosition - poleStartY) / totalPixels + 1; } } /** * 下滚动按钮 */ private function downBtn(event : MouseEvent) : void { scrollText.scrollV++; pole_sprite.y = Math.floor(poleStartY + totalPixels * (scrollText.scrollV - 1) / (scrollText.maxScrollV - 1)); //当鼠标在按钮上按下的时间大于设定时间时,连续滚动 putTime = getTimer(); scrollBar_sprite.addEventListener(Event.ENTER_FRAME, downBtnDown); } private function downBtnDown(event : Event) : void { if(getTimer() - putTime > 500) { scrollText.scrollV++; pole_sprite.y = Math.floor(poleStartY + totalPixels * (scrollText.scrollV - 1) / (scrollText.maxScrollV - 1)); }
上一篇:Flash教程:制作随机画圆弧动画
下一篇:CSS教程:关于H1的使用技巧
|
| 相关文章: |
|
|
|
| 相关软件: |
|
|
|
|