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

forked from: Tricky Hello World!

// forked from beinteractive's Tricky Hello World!
package 
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.utils.Dictionary;
	
	public class Hello extends Sprite
	{
		public function Hello()
		{
			文字列.を生成(爆);
			
			それに対して(たのしい).を追加(爆);
			
			それに対して(にほんごえーえす).を追加(爆);
			
			それを(めっせーじ).で覚える(爆);
			
			テキストフィールド.を生成(爆);
			
			それに対して(覚えた(めっせーじ)).を設定(爆);
			
			それを表示(爆);
		}
		
		private var _stack:Array = [];
		private var _dict:Dictionary = new Dictionary();
		
		private function push(obj:Object):void
		{
			_stack.push(obj);
		}
		
		private function pop():Object
		{
			return _stack.pop();
		}
		
		private function peek():Object
		{
			return _stack[_stack.length - 1];
		}
		
		public function get 爆():Object
		{
			return null;
		}
		
		public function get めっせーじ():String
		{
			return "message";
		}

		public function get たのしい():String
		{
			return "たのしい";
		}
		
		public function get にほんごえーえす():String
		{
			return "日本語AS";
		}
		
		public function get 文字列():Hello
		{
			push(String);
			return this;
		}
		
		public function get テキストフィールド():Hello
		{
			push(TextField);
			return this;
		}
		
		public function を生成(p:Object):void
		{
			var c:Class = pop() as Class;
			push(new c());
		}
		
		public function それに対して(p:Object):Hello
		{
			push(p);
			return this;
		}
		
		public function それを(p:Object):Hello
		{
			push(p);
			return this;
		}
		
		public function を追加(p:Object):void
		{
			var b:String = pop() as String;
			var a:String = pop() as String;
			push(a + b);
		}
		
		public function で覚える(p:Object):void
		{
			var k:Object = pop();
			var v:Object = pop();
			_dict[k] = v;
		}
		
		public function 覚えた(p:Object):Object
		{
			return _dict[p];
		}
		
		public function を設定(p:Object):void
		{
			var s:String = pop() as String;
			var tf:TextField = peek() as TextField;
			tf.text = s;
		}
		
		public function それを表示(p:Object):void
		{
			var tf:TextField = pop() as TextField;
			addChild(tf);
		}
	}
}