标签:
private var beginY:Number;
private function touchEventHandler(e:TouchEvent):void
{
// TODO Auto Generated method stub
var touch:Touch = e.getTouch(e.target as DisplayObject);
if(touch)
{
if(touch.phase == TouchPhase.BEGAN)beginY = touch.globalY;
else if(touch.phase == TouchPhase.ENDED)
{
if((touch.globalY - beginY) > 0)
{
trace("scroll down");
}
else if((touch.globalY - beginY) < 0)
{
trace("scroll up");
}
}
}
}
标签:
原文地址:http://www.cnblogs.com/tonyning/p/4538631.html