{"id":84,"date":"2008-11-05T07:42:52","date_gmt":"2008-11-05T14:42:52","guid":{"rendered":"https:\/\/actionsnippet.com\/?page_id=167"},"modified":"2008-11-05T07:42:52","modified_gmt":"2008-11-05T14:42:52","slug":"warning","status":"publish","type":"page","link":"https:\/\/actionsnippet.com\/?page_id=84","title":{"rendered":"warning"},"content":{"rendered":"<p>I don&#8217;t want to constantly be saying &#8220;This code is interesting but you actually shouldn&#8217;t use it.&#8221; So I&#8217;ll say it once&#8230; <\/p>\n<p>I think it&#8217;s important to mention that some of the code posted here is for reading and playing around only. Things like this:<\/p>\n<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nvar e:String = &quot;addEventListener&quot;;\r\n\r\nstage&#x5B;e](&quot;click&quot;, function():void{\r\n\ttrace(&quot;click&quot;, arguments&#x5B;0]);\r\n});\r\n<\/pre>\n<p>A stage listener that combines square brace syntax, an anonymous function and the arguments array&#8230; is fun to write&#8230; maybe fun to read&#8230; but real projects should use more normal practices:<\/p>\n<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nstage.addEventListener(MouseEvent.CLICK, onStageClick);\r\nfunction onStageClick(evt:MouseEvent):void {\r\n    trace(&quot;clicked&quot;, evt);\r\n}\r\n<\/pre>\n<p><i>more to come on this page&#8230;.<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t want to constantly be saying &#8220;This code is interesting but you actually shouldn&#8217;t use it.&#8221; So I&#8217;ll say it once&#8230; I think it&#8217;s important to mention that some of the code posted here is for reading and playing around only. Things like this: var e:String = &quot;addEventListener&quot;; stage&#x5B;e](&quot;click&quot;, function():void{ trace(&quot;click&quot;, arguments&#x5B;0]); }); A [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-84","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/pages\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=84"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/pages\/84\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}