控件名称 (Component Name): iScrollBox.as
作用 (Description):对放入的控件实现iphone式的滚动条 (A panel with iphone scroll style)
接口 (apis):
var iphoneList:iScrollBox= newiScrollBox(displayObject, speed); //创建iList对象时传入要实现滚动的对象,以及设定滚动速度。
iList.displayObj; //返回传入的对象
Demo: List, Image
List Demo
1. 以拖拽方式滚动list.(Drag to scroll the list)
2. 快速拖拽后放手,会根据拖拽的速度继续向拖拽方向滚动一段时间。慢慢滚动不会引发额外移动。(The list will scroll like iphone when you draging and release the mouse)
3. 滚动时点击item会停止滚动。(click item to stop scroll immediately)
Note: 现在有个bug,拖拽滚动时不能将鼠标划出List。(There is a bug that you can not let mouse out of list when dragging)
Image demo
1. 这个demo模拟地图的移动,试试上下左右拖拽(Just try to drag the “map”)
2. 快速拖拽后放手,会根据拖拽的速度继续向拖拽方向滚动一段时间。慢慢滚动不会引发额外移动
3. 滚动时点击item会停止滚动。
附件里面是demo和iScrollBox.as (Attached demo and source codes)

非常不错的控件,有一点遗憾的是当鼠标移除FLASH的时候,事件就不能很好地响应了,而且再移回去图片就跟着鼠标动了,不知道是否可以用MOUSEOUT事件来解决。
Reply
Kevin Luo Reply:
January 22nd, 2009 at 9:28 AM
恩,单纯的mouseout不行,因为在list的items之间滑动时也会触发mouseout, mousout+mouseX/mouseY判断就可以,不过一直没改它,呵呵。这两天把它fix了。
Reply
楼主能否把上面两个效果的例子发给我看看。。。
我刚接触flex。。。想实现上诉效果。。。
你那个附件下不了了。。。谢谢了啊。。。
Reply
Canbos@163.com
Reply