<?xml version="1.0" encoding="utf-8"?>
<mx:Application name="TextArea_maxVerticalScrollPosition_text"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
private var timer:Timer;
private function init():void {
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
}
private function onTimer(evt:TimerEvent):void {
var now:String = new Date().toTimeString();
var str:String = "[" + timer.currentCount + "] " + now;
textArea.text += str + "\n";
textArea.validateNow();
textArea.verticalScrollPosition = textArea.maxVerticalScrollPosition;
}
]]>
</mx:Script>
<mx:TextArea id="textArea"
width="200"
height="160" />
</mx:Application>