{"id":5966,"date":"2014-04-11T06:53:36","date_gmt":"2014-04-11T06:53:36","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/11\/actionscript-2-0-external-swf-loaded-and-resized-into-movieclip-problem-collection-of-common-programming-errors\/"},"modified":"2014-04-11T06:53:36","modified_gmt":"2014-04-11T06:53:36","slug":"actionscript-2-0-external-swf-loaded-and-resized-into-movieclip-problem-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/11\/actionscript-2-0-external-swf-loaded-and-resized-into-movieclip-problem-collection-of-common-programming-errors\/","title":{"rendered":"Actionscript 2.0 External SWF loaded and resized into Movieclip problem-Collection of common programming errors"},"content":{"rendered":"<p>Lets call the container SWF <strong>mc_a<\/strong> and the SWF to be loaded <strong>mc_b<\/strong>.<\/p>\n<p>Create another container SWF inside <strong>of mc_a<\/strong>. We&#8217;ll call it <strong>mc_c<\/strong> for this discussion.<\/p>\n<p>At runtime, set the visibility of <strong>mc_c<\/strong> to <strong>false<\/strong>.<\/p>\n<p>Load <strong>mc_b<\/strong> into <strong>mc_c<\/strong>.<\/p>\n<p><strong>mc_c<\/strong> will assume the width and height of the loaded SWF, <strong>mc_b<\/strong>, but it will be invisible at this point.<\/p>\n<p>Set the width and height of <strong>mc_c<\/strong> according to what you want.<\/p>\n<p>Set the visibility of <strong>mc_c<\/strong> to <strong>true<\/strong>.<\/p>\n<p>That should do it, or some similar variation of that. You could also forgo the inner container, <strong>mc_c<\/strong>, and just set the visibility of <strong>mc_a<\/strong> to <strong>false<\/strong> at runtime, load <strong>mc_b<\/strong> into it, resize <strong>mc_a<\/strong> accordingly, and then set <strong>mc_a<\/strong>&#8216;s visibility to <strong>true<\/strong>.<\/p>\n<p>The inner container method presumes you might have some other content in <strong>mc_a<\/strong> that you would not want resized. When using the inner container method you might have to adjust the <strong>x\/y<\/strong> of <strong>mc_c<\/strong> as well since it will scale anchored at the top left corner.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lets call the container SWF mc_a and the SWF to be loaded mc_b. Create another container SWF inside of mc_a. We&#8217;ll call it mc_c for this discussion. At runtime, set the visibility of mc_c to false. Load mc_b into mc_c. mc_c will assume the width and height of the loaded SWF, mc_b, but it will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5966","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5966"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5966\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}