0
A
回答
2
会是这样的:
this.createClassObject(mx.containers.ScrollPane, "my_sp", 10);
my_sp.setSize(360, 280);
this.createEmptyMovieClip("button_up",this.getNextHighestDepth());
this.createEmptyMovieClip("button_down",this.getNextHighestDepth());
this.createEmptyMovieClip("button_left",this.getNextHighestDepth());
this.createEmptyMovieClip("button_right",this.getNextHighestDepth());
button_up.onPress=function(){
my_sp.onEnterFrame=function(){
this.vPosition -= 5;
}
}
button_down.onPress=function(){
my_sp.onEnterFrame=function(){
this.vPosition += 5;
}
}
button_left.onPress=function(){
my_sp.onEnterFrame=function(){
this.hPosition -= 5;
}
}
button_right.onPress=function(){
my_sp.onEnterFrame=function(){
this.hPosition += 5;
}
}
//replace this with whatever event you want to use to make the scrolling stop
button_right.onRollOut = button_left.onRollOut = button_up.onRollOut = button_down.onRollOut = function(){
my_sp.onEnterFrame=undefined;
}
你必须检查_hmax和_vmax,以确保您不会滚过内容,其中滚动条会自然停止在年底。我不记得这些变量的名称是什么,但是如果你在调试模式下运行你的程序并且围绕scrollpane实例进行查询,你应该找到它。如果将内置滚动条移动到底部并查看变量发生了什么变化,然后找到匹配并且是静态的变量,它可能会更容易。
相关问题
- 1. Flash ScrollPane混乱,向下滚动向右滚动
- 2. 移动滚动条向上或向下
- 3. 当我向下滚动页面或向上滚动页面时,如何让图像向下滚动或向上滚动?
- 4. 使用上下按钮向上或向下滚动表格
- 5. 过渡向上或向下滚动
- 6. 向上滚动/向下滚动jquery
- 7. 使用纯javascript向上/向下滚动
- 8. 使用向上和向下按钮向上或向下滚动页面横幅
- 9. 向上滚动或向下滚动的JavaScript事件
- 10. UITableViewCell - 向上滚动或向下滚动时重置内容
- 11. 如何检测:向上滚动还是向下滚动?
- 12. 如何使Colorbox iframe随着向上/向下滚动而移动?
- 13. Selenium:使用selelenium RC我们可以向上或向下滚动滚动条
- 14. 如何向上或向下移动div?
- 15. 在滚动,滚动100vh向下/向上作品一旦
- 16. dataGridView滚动向上和向下移动
- 17. jquery滑动向上/向下滚动
- 18. 基于在Framer.js中向上滚动或向下滚动的操作
- 19. 如何识别滚动条并使用Selenium2向上/向下滚动C#
- 20. Div向下滚动或滚动页面
- 21. 如何检测ListView向上或向下滚动
- 22. 滚动按钮jQuery向上滚动并向下滚动
- 23. 如何让jQuery Accordion向上滚动而不是向上滚动并向左滚动?
- 24. 如何让滚动VIew向所有方向滚动?
- 25. Wow.js每次向上或向下滚动都会重复动画
- 26. 当页面向上或向下滚动时移动图像
- 27. 向下滚动区间,如果用户向下滚动
- 28. 向上滚动时向上滚动listview
- 29. 如何在jQuery或Javascript中将箭头绑定到“向上滚动”和向下箭头以“向下滚动”?
- 30. 鼠标滚轮只能向上或向下滚动
对不起,忘了扔在那里,你需要真的把东西放在那些按钮,所以他们不只是空的电影剪辑,并且实际上可以像按钮一样:) – 2009-01-04 09:56:47