[flash width=1000 height=600]http://www.domumstudio.com/TOUCH%20SCROLL.swf[/flash]
var ease:int = 6;
var targY:int = dragMe.y;
var drag:Boolean = false;
var ptY:Number = 0;
dragMe.addEventListener(Event.ENTER_FRAME, dragHandler, false, 0, true);
dragMe.addEventListener(MouseEvent.MOUSE_DOWN, downHandler, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, upHandler, false, 0, true);
function dragHandler(e:Event):void
{
if (drag)
{
targY = mouseY + ptY;
}
e.target.y += (targY - e.currentTarget.y) / ease;
}
function upHandler(event:MouseEvent):void
{
drag = false;
}
function downHandler(e:MouseEvent):void
{
ptY = e.currentTarget.y - mouseY;
drag = true;
}