[AS3]Error: Error #2101: URLVariables.decode() に渡される文字列は、名前/値のペアを含む、URL エンコーディングされたクエリー文字列でなければなりません。 [まとめ]WEB制作に役立つチートシート日本語版9個+9個
12月 25

時間の処理には、trick7さんのTeraClockを使わせてもらいました。

キモは、

(TextArea).verticalScrollPosition = (TextArea).maxVerticalScrollPosition

だけです。

デバッグ用に、TextAreaに変数とかを表示させたいときに、スクロールバーが付いてこないと非常に見づらいので、上の1行を追加すると便利です。

[as]
package
{
	import fl.controls.Button;
	import fl.controls.TextArea;
	import flash.display.MovieClip;
	import flash.events.*;

	import com.trick7.utils.TeraClock;
	/**
	 * ...
	 * @author IRONHEARTS
	 */
	public class Main extends MovieClip
	{
		private var _ta1:TextArea;
		private var _ta2:TextArea;
		private var _reset:Button;
		private var _tc:TeraClock;

		public function Main():void
		{
			addEventListener(Event.ADDED_TO_STAGE, init);
		}

		private function init(e:Event = null):void
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);

			_ta1 = TextArea(getChildByName("ta1"));
			_ta2 = TextArea(getChildByName("ta2"));
			_reset = Button(getChildByName("reset"));

			_reset.addEventListener(MouseEvent.CLICK, resetHandler);

			_tc = new TeraClock;

			_tc.addEventListener(TeraClock.SECONDS_CHANGED, secListener);

		}
		private function resetHandler(e:MouseEvent):void
		{
			_ta1.text = _ta2.text = "";
		}
		private function secListener(e:Event):void
		{
			var s:String = _tc.hours2 + ":" + _tc.minutes2 + ":" + _tc.seconds;

			_ta1.text += s + "\n";
			_ta2.text += s + "\n";

			_ta2.verticalScrollPosition = _ta2.maxVerticalScrollPosition;
		}
	}
}
[/as]

ソース必要な人はドウゾつtascroll.fla,Main.as

Popularity: 9% [?]

written by ANN

add to hatena hatena.comment (3) add to del.icio.us (0) add to livedoor.clip (0) add to Yahoo!Bookmark (0) Total: 3

Leave a Reply