{"id":118,"date":"2008-12-09T00:00:56","date_gmt":"2008-12-09T07:00:56","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=315"},"modified":"2008-12-09T00:00:56","modified_gmt":"2008-12-09T07:00:56","slug":"2d-vector","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=118","title":{"rendered":"2D Vector"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nvar map:Vector.&lt;Vector.&lt;int&gt;&gt; = new Vector.&lt;Vector.&lt;int&gt;&gt;();\r\nmap&#x5B;0] = new Vector.&lt;int&gt;();\r\nmap&#x5B;0].push(1);\r\nmap&#x5B;0].push(0);\r\nmap&#x5B;0].push(0);\r\n\r\nmap&#x5B;1] = new Vector.&lt;int&gt;();\r\nmap&#x5B;1].push(0);\r\nmap&#x5B;1].push(1);\r\nmap&#x5B;1].push(0);\r\n\r\nmap&#x5B;2] = new Vector.&lt;int&gt;();\r\nmap&#x5B;2].push(0);\r\nmap&#x5B;2].push(0);\r\nmap&#x5B;2].push(1);\r\n\r\n\/*\r\nmap:\r\n1,0,0\r\n0,1,0\r\n0,0,1\r\n*\/\r\n<\/pre>\n<p>This creates a two dimensional Vector of ints (flash 10 player only). The first line is the real snippet&#8230; took me a few minutes to get the syntax right the first time I needed a 2D Vector.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>var map:Vector.&lt;Vector.&lt;int&gt;&gt; = new Vector.&lt;Vector.&lt;int&gt;&gt;(); map&#x5B;0] = new Vector.&lt;int&gt;(); map&#x5B;0].push(1); map&#x5B;0].push(0); map&#x5B;0].push(0); map&#x5B;1] = new Vector.&lt;int&gt;(); map&#x5B;1].push(0); map&#x5B;1].push(1); map&#x5B;1].push(0); map&#x5B;2] = new Vector.&lt;int&gt;(); map&#x5B;2].push(0); map&#x5B;2].push(0); map&#x5B;2].push(1); \/* map: 1,0,0 0,1,0 0,0,1 *\/ This creates a two dimensional Vector of ints (flash 10 player only). The first line is the real snippet&#8230; took me a few [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,79],"tags":[3,4],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-arrays","category-vector","tag-actionscript","tag-flash"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/118","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=118"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}