{"id":410,"date":"2009-09-17T08:47:58","date_gmt":"2009-09-17T15:47:58","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=2209"},"modified":"2009-09-17T08:47:58","modified_gmt":"2009-09-17T15:47:58","slug":"quickbox2d-3d","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=410","title":{"rendered":"QuickBox2D 3D"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nimport com.actionsnippet.qbox.*;\r\n&#x5B;SWF(width = 800, height=600, backgroundColor=0x000000, frameRate = 60)]\r\n\r\nvar main:MovieClip = MovieClip(addChild(new MovieClip()));\r\nmain.z = 500;\r\nmain.rotationX = -40;\r\n \r\nvar sim:QuickBox2D = new QuickBox2D(main);\r\n\r\nsim.createStageWalls({fillColor:0x1133CC});\r\nsim.setDefault({lineColor:0xFFFFFF, fillColor:0x113355});\r\n\r\nfor (var i:int = 0; i&lt;30; i++){\r\n\tvar b:QuickObject = sim.addBox({x:Math.random()*10 + 3, y:Math.random()*10 + 3, \r\n\t\t\t\t\t\t\t\t\twidth:0.25 + Math.random()*2, height:0.25 + Math.random()*2});\r\n}\r\n\r\nsim.start();\r\nsim.mouseDrag();\r\n<\/pre>\n<p>This demo shows how you can render your QuickBox2D simulation to somewhere other than the main timeline. In this case, I render to a MovieClip that has altered z and and rotationX properties. <\/p>\n<p><a data-asruffle-linked=\"true\" href=\"http:\/\/www.actionsnippet.com\/swfs\/qb2d_3d.html\" target=\"blank\"><br \/>\nHave a look at the swf&#8230;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/actionsnippet.com\/wp-content\/qb2d3d.gif\" \/><\/a> <span class=\"asruffle-link\" data-swf=\"{&quot;url&quot;:&quot;https:\\\/\\\/actionsnippet.com\\\/swfs\\\/qb2d_3d.swf&quot;,&quot;title&quot;:&quot;qb2d 3d&quot;,&quot;width&quot;:800,&quot;height&quot;:600,&quot;missing&quot;:false,&quot;allowScriptAccess&quot;:false,&quot;backgroundColor&quot;:&quot;#000000&quot;}\"><button type=\"button\" hidden aria-expanded=\"false\">Play demo<span class=\"screen-reader-text\">: qb2d 3d<\/span><\/button><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>import com.actionsnippet.qbox.*; &#x5B;SWF(width = 800, height=600, backgroundColor=0x000000, frameRate = 60)] var main:MovieClip = MovieClip(addChild(new MovieClip())); main.z = 500; main.rotationX = -40; var sim:QuickBox2D = new QuickBox2D(main); sim.createStageWalls({fillColor:0x1133CC}); sim.setDefault({lineColor:0xFFFFFF, fillColor:0x113355}); for (var i:int = 0; i&lt;30; i++){ var b:QuickObject = sim.addBox({x:Math.random()*10 + 3, y:Math.random()*10 + 3, width:0.25 + Math.random()*2, height:0.25 + Math.random()*2}); } sim.start(); sim.mouseDrag(); This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101,11,12],"tags":[3,14,15,4,126,16],"class_list":["post-410","post","type-post","status-publish","format-standard","hentry","category-3d","category-box2d","category-quickbox2d","tag-actionscript","tag-as3","tag-box2d","tag-flash","tag-fp10","tag-quickbox2d"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/410","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=410"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/410\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}