In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

関数クロージャ使えばprivateなメンバが消えてなくなるよ!

説明
http://d.hatena.ne.jp/coppieee/20090805/1249491863
Get Adobe Flash player
by coppieee 05 Aug 2009
/**
 * Copyright coppieee ( http://wonderfl.net/user/coppieee )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/mb6M
 */

//説明
//http://d.hatena.ne.jp/coppieee/20090805/1249491863
package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.text.TextField;
	
	public class Main extends Sprite
	{
		public function Main()
		{
			var tf:TextField = new TextField();
			addChild(tf);
			var count:int = 60;
			addEventListener(Event.ENTER_FRAME, function(e:Event):void {
				tf.text = "count" + count--;
				if (count < 0)
				{
					removeEventListener(Event.ENTER_FRAME, arguments.callee);
				}
			});
		}
	}
}