
{"id":377,"date":"2008-08-27T09:00:06","date_gmt":"2008-08-27T08:00:06","guid":{"rendered":"http:\/\/www.matthijskamstra.nl\/blog\/?p=377"},"modified":"2009-05-28T22:16:57","modified_gmt":"2009-05-28T21:16:57","slug":"from-as2-to-as3-where-did-it-go-swapdepths","status":"publish","type":"post","link":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/","title":{"rendered":"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths"},"content":{"rendered":"<p>Where did <code>swapDepths ()<\/code> go in AS3?<\/p>\n<p>This is what the <a href=\"http:\/\/livedocs.adobe.com\/flex\/2\/langref\/migration.html\">ActionScript 2.0 Migration<\/a> has to say about this:<\/p>\n<table width='95%' border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n<tr style='background-color:silver'>\n<td><strong>ActionScript&nbsp;2.0&nbsp;<\/strong><\/td>\n<td><strong>ActionScript&nbsp;3.0&nbsp;<\/strong><\/td>\n<td><strong>Comments<\/strong><\/td>\n<\/tr>\n<tr style='background-color:#F5F5F5'>\n<td>swapDepths() Method <\/td>\n<td>Removed <\/td>\n<td>In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. <\/td>\n<\/tr>\n<\/table>\n<p>Removed&#8230; bummer, so with what do I replace it with&#8230;<\/p>\n<p>In AS2 you can use <code>swapDepths()<\/code> in two ways:<\/p>\n<blockquote>\n<ul>\n<li>A Number that specifies the depth level where the movie clip is to be placed. <\/li>\n<li>An instance name that specifies the movie clip instance whose depth is swapped with the movie clip for which the method is being applied. Both movie clips must have the same parent movie clip. <\/li>\n<\/ul>\n<\/blockquote>\n<p>In the examples there are two movieClips: &#8216;<code>circle_mc<\/code>&#8216; and &#8216;<code>square_mc<\/code>&#8216;. Movieclip <code>square_mc<\/code> is under <code>circle_mc<\/code> (z-index is lower then circle_mc). And the task is to get  <code>square_mc<\/code> above <code>circle_mc<\/code>.<\/p>\n<h3>AS 2<\/h3>\n<p>There are a couple of ways to do that in ActionScript 2:<\/p>\n<p><strong>Example #1<\/strong><br \/>\nSwap the depth of two movieclips which each other (square_mc will be placed on the depth of circle_mc, and the other way around)<br \/>\n<code>this.square_mc.swapDepths(this.circle_mc);<\/code><\/p>\n<p><strong>Example #2<\/strong><br \/>\nI consider this a hack, but one that works<br \/>\n<code>this.square_mc.swapDepths(1000000);<\/code><\/p>\n<p><strong>Example #3<\/strong><br \/>\nWhen you want to change the depth of something, this is usually to place it on top:<br \/>\n<code>this.square_mc.swapDepths(this.getNextHighestDepth());<\/code><\/p>\n<h3>AS 3<\/h3>\n<p>Lets try this in ActionScript 3:<\/p>\n<p><strong>Example #1<\/strong><br \/>\n<code>this.swapChildren(square_mc, circle_mc);<\/code><br \/>\n<em>Visit <a href=\"http:\/\/livedocs.adobe.com\/flash\/9.0\/ActionScriptLangRefV3\/flash\/display\/DisplayObjectContainer.html#swapChildren()\">livedocs<\/a> at the Adobe site for more information and example code<\/em><br \/>\n[as]<br \/>\nvar square = this.getChildByName (&#8216;square_mc&#8217;);<br \/>\nvar circle = this.getChildByName (&#8216;circle_mc&#8217;);<\/p>\n<p>trace(this.getChildAt(0).name); \/\/ square_mc<br \/>\ntrace(this.getChildAt(1).name); \/\/ circle_mc<\/p>\n<p>this.swapChildren(square as DisplayObject, circle as DisplayObject);<\/p>\n<p>trace(this.getChildAt(0).name); \/\/ circle_mc<br \/>\ntrace(this.getChildAt(1).name); \/\/ square_mc<br \/>\n[\/as]<\/p>\n<p><strong>Example #2<\/strong><br \/>\nnot possible anymore&#8230; if you want a detailed explanation visit <a href=\"http:\/\/www.dreaminginflash.com\/2007\/11\/06\/as2-swapdepths-vs-as3-setchildindex\/\">dreaming in Flash<\/a> blog, and read more about swapDepths() in AS3  (it&#8217;s explained with a image)<\/p>\n<p><strong>Example #3<\/strong><br \/>\nTo place a movieclip on the highest depth in actionscript2, we will use MovieClip.getNextHighestDepth,<br \/>\nbut in AS3 that function is removed \ud83d\ude41<\/p>\n<p>In AS3 you need to use <code>numChildren<\/code>:<br \/>\n<code>this.setChildIndex ( square_mc , this.numChildren - 1 );<\/code><br \/>\n<em>Visit <a href=\"http:\/\/livedocs.adobe.com\/flash\/9.0\/ActionScriptLangRefV3\/flash\/display\/DisplayObjectContainer.html#setChildIndex()\">livedocs<\/a> at the Adobe site for more information and example code<\/em><\/p>\n<p>I realize that this is not a complete explanation&#8230; but I hope this is a starting point to find old function that you used in AS2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript&nbsp;2.0&nbsp; ActionScript&nbsp;3.0&nbsp; Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed&#8230; bummer, so with what [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,172,3],"tags":[68,39,97,398,114,168,166],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-as3","category-as3-migration","category-flash","tag-actionscript","tag-as2","tag-as2-to-as3","tag-flash","tag-from-as2-to-as3","tag-migration","tag-movieclip"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Matthijs Kamstra\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"[mck] | a polymath zapper\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]\" \/>\n\t\t<meta property=\"og:description\" content=\"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-08-27T08:00:06+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-05-28T21:16:57+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#article\",\"name\":\"From AS2 to AS3 \\u2013 Where did it go \\u2013 swapDepths | [mck]\",\"headline\":\"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths\",\"author\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/#organization\"},\"datePublished\":\"2008-08-27T09:00:06+01:00\",\"dateModified\":\"2009-05-28T22:16:57+01:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#webpage\"},\"articleSection\":\"AS3, AS3 migration, Flash, Actionscript, AS2, AS2 to AS3, Flash, from AS2 to AS3, migration, movieclip\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/#listItem\",\"name\":\"Flash\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/#listItem\",\"position\":2,\"name\":\"Flash\",\"item\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/as3\\\/#listItem\",\"name\":\"AS3\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/as3\\\/#listItem\",\"position\":3,\"name\":\"AS3\",\"item\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/as3\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#listItem\",\"name\":\"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/#listItem\",\"name\":\"Flash\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#listItem\",\"position\":4,\"name\":\"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/category\\\/flash\\\/as3\\\/#listItem\",\"name\":\"AS3\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/#organization\",\"name\":\"[mck]\",\"description\":\"a polymath zapper\",\"url\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Matthijs Kamstra\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/06ff22a1197b6624946e5a3377184f11ddc00ac06a6f1d2311b9d2072bdf61b1?s=96&d=wavatar&r=g\",\"width\":96,\"height\":96,\"caption\":\"Matthijs Kamstra\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#webpage\",\"url\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/\",\"name\":\"From AS2 to AS3 \\u2013 Where did it go \\u2013 swapDepths | [mck]\",\"description\":\"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/2008\\\/08\\\/27\\\/from-as2-to-as3-where-did-it-go-swapdepths\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2008-08-27T09:00:06+01:00\",\"dateModified\":\"2009-05-28T22:16:57+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/\",\"name\":\"[mck]\",\"description\":\"a polymath zapper\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.matthijskamstra.nl\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]","description":"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what","canonical_url":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#article","name":"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]","headline":"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths","author":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/#organization"},"datePublished":"2008-08-27T09:00:06+01:00","dateModified":"2009-05-28T22:16:57+01:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#webpage"},"isPartOf":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#webpage"},"articleSection":"AS3, AS3 migration, Flash, Actionscript, AS2, AS2 to AS3, Flash, from AS2 to AS3, migration, movieclip"},{"@type":"BreadcrumbList","@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.matthijskamstra.nl\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/#listItem","name":"Flash"}},{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/#listItem","position":2,"name":"Flash","item":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/as3\/#listItem","name":"AS3"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/as3\/#listItem","position":3,"name":"AS3","item":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/as3\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#listItem","name":"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/#listItem","name":"Flash"}},{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#listItem","position":4,"name":"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths","previousItem":{"@type":"ListItem","@id":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/as3\/#listItem","name":"AS3"}}]},{"@type":"Organization","@id":"https:\/\/www.matthijskamstra.nl\/blog\/#organization","name":"[mck]","description":"a polymath zapper","url":"https:\/\/www.matthijskamstra.nl\/blog\/"},{"@type":"Person","@id":"https:\/\/www.matthijskamstra.nl\/blog\/author\/admin\/#author","url":"https:\/\/www.matthijskamstra.nl\/blog\/author\/admin\/","name":"Matthijs Kamstra","image":{"@type":"ImageObject","@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/06ff22a1197b6624946e5a3377184f11ddc00ac06a6f1d2311b9d2072bdf61b1?s=96&d=wavatar&r=g","width":96,"height":96,"caption":"Matthijs Kamstra"}},{"@type":"WebPage","@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#webpage","url":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/","name":"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]","description":"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/#breadcrumblist"},"author":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/author\/admin\/#author"},"datePublished":"2008-08-27T09:00:06+01:00","dateModified":"2009-05-28T22:16:57+01:00"},{"@type":"WebSite","@id":"https:\/\/www.matthijskamstra.nl\/blog\/#website","url":"https:\/\/www.matthijskamstra.nl\/blog\/","name":"[mck]","description":"a polymath zapper","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.matthijskamstra.nl\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"[mck] | a polymath zapper","og:type":"article","og:title":"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]","og:description":"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what","og:url":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/","article:published_time":"2008-08-27T08:00:06+00:00","article:modified_time":"2009-05-28T21:16:57+00:00","twitter:card":"summary_large_image","twitter:title":"From AS2 to AS3 \u2013 Where did it go \u2013 swapDepths | [mck]","twitter:description":"Where did swapDepths () go in AS3? This is what the ActionScript 2.0 Migration has to say about this: ActionScript 2.0 ActionScript 3.0 Comments swapDepths() Method Removed In ActionScript 3.0, you can achieve similar functionality by using the methods of the DisplayObjectContainer class, such as the addChildAt(), setChildIndex(), swapChildren(), and swapChildrenAt() methods. Removed... bummer, so with what"},"aioseo_meta_data":{"post_id":"377","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-12-11 09:02:54","updated":"2025-06-04 09:14:12","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.matthijskamstra.nl\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/\" title=\"Flash\">Flash<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/as3\/\" title=\"AS3\">AS3<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFrom AS2 to AS3 \u2013 Where did it go \u2013 swapDepths\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.matthijskamstra.nl\/blog"},{"label":"Flash","link":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/"},{"label":"AS3","link":"https:\/\/www.matthijskamstra.nl\/blog\/category\/flash\/as3\/"},{"label":"From AS2 to AS3 &#8211; Where did it go &#8211; swapDepths","link":"https:\/\/www.matthijskamstra.nl\/blog\/2008\/08\/27\/from-as2-to-as3-where-did-it-go-swapdepths\/"}],"_links":{"self":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":3,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":945,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/377\/revisions\/945"}],"wp:attachment":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}