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");
}
}
}
}
posted on 2015-05-29 15:36  TonyNing  阅读(173)  评论(0编辑  收藏  举报