forked from: カオスバージョン forked from: あなたのイベントハンドラを教えて!

by keim_at_Si forked from カオスバージョン forked from: あなたのイベントハンドラを教えて! (diff: 258)
あなたのイベントハンドラを教えて!
*
* 複数のイベント&複数のインスタンスに
* イベントハンドラを設定するときに
* みなさんの記述方法の違いを知りたい。
*
* [ルール]
* 画面上に3つのボタンが用意されており、
* クリックとロールオーバーの
* イベントハンドラを記述してください。
♥14 | Line 101 | Modified 2010-06-04 00:33:42 | MIT License
play

ActionScript3 source code

/**
 * Copyright keim_at_Si ( http://wonderfl.net/user/keim_at_Si )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ttp8
 */

// forked from bkzen's カオスバージョン forked from: あなたのイベントハンドラを教えて!
// forked from clockmaker's あなたのイベントハンドラを教えて!
/**
* あなたのイベントハンドラを教えて!
*
* 複数のイベント&複数のインスタンスに
* イベントハンドラを設定するときに
* みなさんの記述方法の違いを知りたい。
*
* [ルール]
* 画面上に3つのボタンが用意されており、
* クリックとロールオーバーの
* イベントハンドラを記述してください。
*/
package {
    import flash.display.Sprite;
	import flash.events.Event;
    import flash.events.MouseEvent;
	import flash.utils.describeType;
	[SWF (backgroundColor = "0xFFFFFF", width = "465", height = "465", frameRate = "30")]
    public class FlashTest3 extends Sprite {
    
		private var $: MyTextField;
		
		public function FlashTest3() 
		{
            $ = new MyTextField();
            $.x = 150; $.y = 100;
            addChild($);
			addEventListener(Event.ENTER_FRAME, init);
		}
		
		private function init(e:Event):void 
		{
			removeEventListener(Event.ENTER_FRAME, init);
			//
			var _:*=new MyButton,$:*=this;
			

/*
[For Basic Understanding]
1) pickup letter from "true", "false", "[object Object]" or "[class String]"
  /.$/(/../(!{})) => "a"    !{} = "false";  /../("false") = "fa";  /.$/("fa") = "a"
  /.$/(/.../({})) => "b"    {} = "[object Object]";  /.../("[object Object]") = "[ob";  /.$/("[ob") = "b"
  /./(/.. /({}))  => "c"    {} = "[object Object]";  /.. /("[object Object]") = "ct ";  /./("ct ") = "c"
2) Or calculate letter by int.toString(36)
  (22).toString(36) = "m"
3) Then put letters in XML by {}
  <>{"a"}{"b"}{"c"}</> = "abc"
4) And access properties by []
  $[<>{"a"}{"b"}{"c"}</>](<>{"d"}</>) = $.abc("d")
*/

// Finally, following code is constructed. 
([])["concat"]("a")["concat"]("b")["concat"]("c")
["map"]($["m"]($, "addChild", _["constructor"]["create"],$["u"]))
["map"]($["f"]("position", $.i("3c"), 0))
["map"]($["f"]("addEventListener", "rollOver", $["h"]($.$, "setText", "rollover ", "target", "text")))
["map"]($["f"]("addEventListener", "click",    $["h"]($.$, "setText", "click ",    "target", "text")));

/*----------Analysis
([]) //[]
[<>	 //["concat"]("a")["concat"]("b")["concat"]("c")
    {/./(/.. /({}))}        // "c"
    {/.$/(/../({}))}        // "o"
    {/.$/(/../({}[{}]))}    // "n"
    {/./(/.. /({}))}        // "c"
    {/.$/(/../(!{}))}       // "a"
    {/./(!!{})}             // "t"
</>]
(<>{/.$/(/../(!{}))}</>)    // "a"
[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/.. /({}))}{/.$/(/../(!{}))}{/./(!!{})}</>] // concat
(<>{/.$/(/.../({}))}</>)    // "b"
[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/.. /({}))}{/.$/(/../(!{}))}{/./(!!{})}</>] // concat
(<>{/./(/.. /({}))}</>)     // "c"
[<> // ["map"]
    {// "22".toString(36) = "m"
        ( // $.i("b")<<1 = 22
            $[<>{/./(/....$/({}[{}]))}</>]  // $.i
            (<>{/.$/(/.../({}))}</>)        // ("b")
            <<((~0)>>>(~0))                 // (-1>>>-1) = 1 ?  
        )
        [<>
            {/./(!!{})}             // "t"
            {/.$/(/../({}))}        // "o"
            {$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}     // $u("s") = "S"
            {/./(!!{})}             // "t" -> "tr"ue?
            {/.$/(/../(!!{}))}      // "r"
            {/./(/....$/({}[{}]))}  // "i"
            {/.$/(/../({}[{}]))}    // "n"
            {/./(/..$/(             // "g"
                (/./({})[0])        // ({}.toString().match())[0].constructor = "[class String]"
                [<>
                    {/./(/.. /({}))}     // "c"
                    {/.$/(/../({}))}     // "o"
                    {/.$/(/../({}[{}]))} // "n"
                    {/./(/..$/(!{}))}    // "s"
                    {/./(!!{})}          // "t"
                    {/.$/(/../(!!{}))}   // "r"
                    {/./([][{}])}        // "u"
                    {/./(/.. /({}))}     // "c"
                    {/./(!!{})}          // "t"
                    {/.$/(/../({}))}     // "o"
                    {/.$/(/../(!!{}))}   // "r"
                </>]
            ))}
        </>]
        (   // $.i("10") = 36
            $[<>{/./(/....$/({}[{}]))}</>]  // $.i
            (<>{(~0)>>>(~0)}{0}</>)         // "10"
        )
    }
    {/.$/(/../(!{}))}   // a
    {   // "25".toString(36)    // "p"
        ($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../({}))}</>)|((~0)>>>(~0)))    // $.i("o")|1 = 25
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }
</>]
($  // $["m"]($, "addChild", _["constructor"]["create"], $["u"]) => function(...arg):*{ return $.addChild(_.constructor.create()($.u(arg[0]))); }
    [<> // // "22".toString(36) = "m"
        {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/.../({}))}</>)<<((~0)>>>(~0)))    // $.i("b")<<1 = 22
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }</>]
    ($,<> // ($,"addChild",_.constructor.create,$.u)
        {/.$/(/../(!{}))}   // "a"
        {/.$/({}[{}])}      // "d"
        {/.$/({}[{}])}      // "d"
        {$[<>{/./([][{}])}</>](<>{/./(/.. /({}))}</>)}  // $.u("c") = "C"
        {   // (17).toString(36) = "h"
            ($[<>{/./(/....$/({}[{}]))}</>](<>{/./(/....$/({}[{}]))}</>)^((((~0)>>>(~0))<<((~0)>>>(~0)))|((~0)>>>(~0)))) // $.i("i")^((1<<1)|1) = 17
            // toString($.i("10"))
            [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
        }
        {/./(/....$/({}[{}]))}  // "i"
        {/./(/...$/(!{}))}      // "l"
        {/.$/({}[{}])}          // "d"
    </>,
    _[<>    // _.constructor.create
        {/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}    // "constructor"
    </>]
    [<>{/./(/.. /({}))}{/.$/(/../(!!{}))}{/.$/(!{})}{/.$/(/../(!{}))}{/./(!!{})}{/.$/(!{})}</>],    // "create"
    $[<>{/./([][{}])}</>]   // $["u"]
    )
)
[<>{ // ["map"]
    ($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/.../({}))}</>)<<((~0)>>>(~0))) // 22
    // toString($.i("10"))
    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }
    {/.$/(/../(!{}))}   // "a"
    {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../({}))}</>)|((~0)>>>(~0)))  // 25
    // toString($.i("10"))
    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }
</>]
// $["f"]("position",$.i("3c"),0) => function(...arg):* { return arg[0].position(120*arg[1],0); }
($[<>{/./(!{})}</>] 	// $["f"]
    (<> //"positoin"
        {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../({}))}</>)|((~0)>>>(~0)))
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))}
        {/.$/(/../({}))}{/./(/..$/(!{}))}{/./(/....$/({}[{}]))}{/./(!!{})}{/./(/....$/({}[{}]))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}</>, 
    $[<>{/./(/....$/({}[{}]))}</>](<>{(((~0)>>>(~0))<<((~0)>>>(~0)))|(~0)>>>(~0)}{/./(/.. /({}))}</>),  // $.i("3c") = 120
    0)
)
[<>{ // ["map"]
    ($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/.../({}))}</>)<<((~0)>>>(~0)))
    // toString($.i("10"))
    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }
    {/.$/(/../(!{}))}
    {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../({}))}</>)|((~0)>>>(~0)))
    // toString($.i("10"))
    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }
</>]
// $["f"]("addEventListener", "rollOver", $["h"]($.$, "setText", "rollover", "target", "text"))
($[<>{/./(!{})}</>]  // $["f"]
    (<> // "addEventListener"
        {/.$/(/../(!{}))}{/.$/({}[{}])}{/.$/({}[{}])}{$[<>{/./([][{}])}</>](<>{/.$/(!{})}</>)}  // "addE"
        { // "v"
            ($[<>{/./(/....$/({}[{}]))}</>](<>{/./([][{}])}</>)|((~0)>>>(~0)))
            // toString($.i("10"))
            [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
        }
        {/.$/(!{})}{/.$/(/../({}[{}]))}{/./(!!{})}{$[<>{/./([][{}])}</>](<>{/./(/...$/(!{}))}</>)}{/./(/....$/({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(!{})}{/.$/(/../({}[{}]))}{/.$/(!{})}{/.$/(/../(!!{}))}</>, // "entListener"
    <>  // "rollOver"
        {/.$/(/../(!!{}))}{/.$/(/../({}))}{/./(/...$/(!{}))}{/./(/...$/(!{}))}{$[<>{/./([][{}])}</>](<>{/.$/(/../({}))}</>)}
        {($[<>{/./(/....$/({}[{}]))}</>](<>{/./([][{}])}</>)|((~0)>>>(~0)))
            // toString($.i("10"))
            [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
        }
        {/.$/(!{})}{/.$/(/../(!!{}))}</>,
    // $["h"]($.$, "setText", "rollover", "target", "text")
    $[<>{ // $["h"]
        ($[<>{/./(/....$/({}[{}]))}</>](<>{/./(/....$/({}[{}]))}</>)^((((~0)>>>(~0))<<((~0)>>>(~0)))|((~0)>>>(~0))))
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }</>]
        ($.$, // MyTextField
            <> // "setText"
                {/./(/..$/(!{}))}{/.$/(!{})}{/./(!!{})}
                {$[<>{/./([][{}])}</>](<>{/./(!!{})}</>)}
                {/.$/(!{})}
                { //(33).toString(36) = "x"
                    (($[<>{/./(/....$/({}[{}]))}</>]   // ($.i("g") << 1) | 1 = 33
                    (<>{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>) // "g"
                    <<((~0)>>>(~0)))|((~0)>>>(~0)))
                    // toString($.i("10"))
                    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
                }
                {/./(!!{})}</>,
            <> // "rollover "
                {/.$/(/../(!!{}))}{/.$/(/../({}))}{/./(/...$/(!{}))}{/./(/...$/(!{}))}{/.$/(/../({}))}
                {($[<>{/./(/....$/({}[{}]))}</>](<>{/./([][{}])}</>)|((~0)>>>(~0)))
                    // toString($.i("10"))
                    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
                }
                {/.$/(!{})}{/.$/(/../(!!{}))}{/ /({})}</>,
            <>  // "target"
                {/./(!!{})}{/.$/(/../(!{}))}{/.$/(/../(!!{}))}
                {/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}
                {/.$/(!{})}{/./(!!{})}</>,
            <>  // "text"
                {/./(!!{})}{/.$/(!{})}
                { //(33).toString(36) = "x"
                    (($[<>{/./(/....$/({}[{}]))}</>]
                    (<>{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>)
                    <<((~0)>>>(~0)))|((~0)>>>(~0)))
                    // toString($.i("10"))
                    [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
                }
                {/./(!!{})}</>
        )
    )
)
[<> // ["map"]
    {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/.../({}))}</>)<<((~0)>>>(~0)))
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))}
    {/.$/(/../(!{}))}
    {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../({}))}</>)|((~0)>>>(~0)))
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
}</>]
// $["f"]("addEventListener", "click", $["h"]($.$, "setText", "rollover ", "target", "text"))
($[<>{/./(!{})}</>]( //$["f"]
    <> // "addEventListener"
        {/.$/(/../(!{}))}{/.$/({}[{}])}{/.$/({}[{}])}{$[<>{/./([][{}])}</>](<>{/.$/(!{})}</>)}
        {($[<>{/./(/....$/({}[{}]))}</>](<>{/./([][{}])}</>)|((~0)>>>(~0)))
            // toString($.i("10"))
            [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
        }{/.$/(!{})}{/.$/(/../({}[{}]))}{/./(!!{})}{$[<>{/./([][{}])}</>](<>{/./(/...$/(!{}))}</>)}{/./(/....$/({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(!{})}{/.$/(/../({}[{}]))}{/.$/(!{})}{/.$/(/../(!!{}))}</>,
    <> // "click"
        {/./(/.. /({}))}{/./(/...$/(!{}))}{/./(/....$/({}[{}]))}{/./(/.. /({}))}
        {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../(!{}))}</>)<<((~0)>>>(~0)))    // $.i("a")<<1 = 20
            // toString($.i("10"))
            [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
        }</>,
    // $["h"]($.$, "click ", "setText", "click ", "target", "text"))
    $[<>{   // $["h"]
        ($[<>{/./(/....$/({}[{}]))}</>](<>{/./(/....$/({}[{}]))}</>)^((((~0)>>>(~0))<<((~0)>>>(~0)))|((~0)>>>(~0))))
        // toString($.i("10"))
        [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))
    }</>]
    ($.$,
        <> // "setText" 
            {/./(/..$/(!{}))}{/.$/(!{})}{/./(!!{})}{$[<>{/./([][{}])}</>](<>{/./(!!{})}</>)}{/.$/(!{})}
            {(($[<>{/./(/....$/({}[{}]))}</>](<>{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>)<<((~0)>>>(~0)))|((~0)>>>(~0)))
                // toString($.i("10"))
                [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))}
            {/./(!!{})}</>,
        <>  // "click "
            {/./(/.. /({}))}{/./(/...$/(!{}))}{/./(/....$/({}[{}]))}{/./(/.. /({}))}
            {($[<>{/./(/....$/({}[{}]))}</>](<>{/.$/(/../(!{}))}</>)<<((~0)>>>(~0)))
                // toString($.i("10"))
                [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))}
            {/ /({})}</>,
        <>  // "target"
            {/./(!!{})}{/.$/(/../(!{}))}{/.$/(/../(!!{}))}
            {/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}
            {/.$/(!{})}{/./(!!{})}</>,
        <>  // "text"
            {/./(!!{})}{/.$/(!{})}
            {(($[<>{/./(/....$/({}[{}]))}</>](<>{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>)<<((~0)>>>(~0)))|((~0)>>>(~0)))
                // toString($.i("10"))
                [<>{/./(!!{})}{/.$/(/../({}))}{$[<>{/./([][{}])}</>](<>{/./(/..$/(!{}))}</>)}{/./(!!{})}{/.$/(/../(!!{}))}{/./(/....$/({}[{}]))}{/.$/(/../({}[{}]))}{/./(/..$/((/./({})[0])[<>{/./(/.. /({}))}{/.$/(/../({}))}{/.$/(/../({}[{}]))}{/./(/..$/(!{}))}{/./(!!{})}{/.$/(/../(!!{}))}{/./([][{}])}{/./(/.. /({}))}{/./(!!{})}{/.$/(/../({}))}{/.$/(/../(!!{}))}</>]))}</>]($[<>{/./(/....$/({}[{}]))}</>](<>{(~0)>>>(~0)}{0}</>))}
        {/./(!!{})}</>)
    )
);
*/
        }
    
		private function h(...r): Function
		{
			return function(...arg): void
			{
				r[0][r[1]](r[2] + arg[0][r[3]][r[4]]);
			}
		}
		
		private function f(...r): Function
		{
			return function(...arg): *
			{
				if (r[1] is Number) return arg[0][r[0]](r[1]*arg[1],r[2]);
				else arg[0][r[0]](r[1], r[2]);
				return arg[0];
			}
		}
		
		private function m(...r): Function
		{
			return function(...arg): *
			{
				return r[0][r[1]](r[2](r[3](arg[0])));
			}
		}
		
		private function u(value: *): String
		{
			return ("" + value).toUpperCase();
		}
		
		private function l(value: *): String
		{
			return ("" + value).toLowerCase();
		}
		
		private function i(value: *): int
		{
			return parseInt("" + value, 36);
		}
    }
}

import flash.display.*
import flash.text.*;

/**
* MyButton クラスはボタン的な挙動をするようにしたSpriteです。
*/
class MyButton extends Sprite {
    private var _text:MyTextField;
    /**
    * 新しい MyButton インスタンスを作成します。
    */
    public function MyButton(value: String = ""){
        graphics.beginFill(0x000000);
        graphics.drawRoundRect(0, 0, 100, 30, 5, 5);
        addChild(_text = new MyTextField);
        buttonMode = true;
		text = value;
    }
    /**
    * ボタンの文言を設定します。
    */
    public function set text(value:String):void {
        _text.text = value;
        _text.x = (100 - _text.textWidth) / 2;
        _text.y = (30 - _text.textHeight) / 2;
    }
	public function get text(): String { return _text.text; }
	public function position(x: Number, y: Number): MyButton
	{
		this.x = x, this.y = y;
		return this;
	}
	
	public static function create(value: *): MyButton
	{
		return new MyButton("Button " + value);
	}
}

/**
* MyTextField クラスは適当な初期設定をしただけのテキストフィールドです。
*/
class MyTextField extends TextField {
    /**
    * 新しい MyTextField インスタンスを作成します。
    */
    public function MyTextField() {
        defaultTextFormat = new TextFormat("_sans", 12, 0xFF0000);
        autoSize = "left";
        selectable = false;
        mouseEnabled = false;
    }
	public function setText(value: *): void
	{
		text = "" + value;
	}
}

Forked