             isScrolling = false;
             
             // don't do anything
-            var scrollEndEvent:TouchScrollEvent = new TouchScrollEvent(TouchScrollEvent.TOUCH_SCROLL_END);
+            scrollEndEvent = new TouchScrollEvent(TouchScrollEvent.TOUCH_SCROLL_END);
             scrollEndEvent.scrollingObject = scroller;
             scroller.dispatchEvent(scrollEndEvent);
             return;
         }
         
-        
         var velocities:Vector.<Point> = calculateVelocity(clickHistory, timeHistory);
         
         var velocityWeights:Vector.<Number> = Vector.<Number>([1,1.33,1.66,2]);

//                scrollDragStartEvent.scrollingObject = scroller;
//                scroller.dispatchEvent(scrollDragStartEvent);
                scrollStartPoint = new Point(mouseEvent.stageX, mouseEvent.stageY);
            }
            
            // only need to do this stuff once per target

        lastVelocity.x /= lastTime;
        lastVelocity.y /= lastTime;
        
        var scrollEndEvent:TouchScrollEvent;
        
        // FIXME (rfrishbe): should be minXVelocity, minYVelocity, minDiagonalVelocity
        // FIXME (rfrishbe): this should be parameterized better
        if ( (lastTime >= 3*averageTime) &&
