{"id":184,"date":"2009-02-10T09:35:02","date_gmt":"2009-02-10T16:35:02","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=760"},"modified":"2009-02-10T09:35:02","modified_gmt":"2009-02-10T16:35:02","slug":"the-big-init-2","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=184","title":{"rendered":"The Big init() #2"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\n\/\/ see previous post for details, this code won&#039;t run on it&#039;s own\r\nwith(addChild(window)){\r\n\tx = 10, y = 10;\r\n\twith(addChild(c0)) x = 10, y = 10;\r\n\twith(addChild(c1)) x = 20, y = 10;\r\n\twith(addChild(box)){\r\n\t\tx = 50, y = 10;\r\n\t\twith(addChild(txt)) x = 5, y = 5;\r\n\t}\r\n}\r\n<\/pre>\n<p>It&#8217;s entertaining to try and think of different DisplayObject nesting techniques. I have a few more of these rolling around in my head that I&#8217;ll try out soon&#8230;. The only good\/notable thing about the above is that it shows that nested with statements actually work like you&#8217;d expect them to&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ see previous post for details, this code won&#039;t run on it&#039;s own with(addChild(window)){ x = 10, y = 10; with(addChild(c0)) x = 10, y = 10; with(addChild(c1)) x = 20, y = 10; with(addChild(box)){ x = 50, y = 10; with(addChild(txt)) x = 5, y = 5; } } It&#8217;s entertaining to try and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[3,4],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-misc","tag-actionscript","tag-flash"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"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=184"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}