scrollPositions[i+1]) return false; return true; } /** Returns true if the scroll positions are non-increasing */ public function assertNegativeScrollDirection():Boolean { for (var i:int = 0; i < scrollPositions.length - 1; i++) if (scrollPositions[i] < scrollPositions[i+1]) return false; return true; } /** Traces the direction of scroll */ private function showResults():void { trace('positive scroll direction:', assertPositiveScrollDirection()); trace('negative scroll direction:', assertNegativeScrollDirection()); } ]]> first second third fourth fifth sixth seventh last