<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Abstracting Assets from Actionscript in AS3.0 &#8211; Asset Libraries and DuplicateMovieClip</title>
	<atom:link href="http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/feed/" rel="self" type="application/rss+xml" />
	<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/</link>
	<description>Bits and blobs on anything tech</description>
	<lastBuildDate>Sat, 31 Dec 2011 19:51:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: mickbuely</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-2/#comment-48945</link>
		<dc:creator>mickbuely</dc:creator>
		<pubDate>Sat, 31 Dec 2011 19:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-48945</guid>
		<description>hello to  every one -  hope yous had a good xmas -  pity we didnt get snow was all prepared wi sledges kids loving it any ways  , all the best for  the comming year -  michael</description>
		<content:encoded><![CDATA[<p>hello to  every one &#8211;  hope yous had a good xmas &#8211;  pity we didnt get snow was all prepared wi sledges kids loving it any ways  , all the best for  the comming year &#8211;  michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viaria</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-2/#comment-36512</link>
		<dc:creator>viaria</dc:creator>
		<pubDate>Sun, 15 May 2011 12:00:32 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-36512</guid>
		<description>there is no duplicating here. it is creating.</description>
		<content:encoded><![CDATA[<p>there is no duplicating here. it is creating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basti</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-2/#comment-24312</link>
		<dc:creator>Basti</dc:creator>
		<pubDate>Tue, 26 Oct 2010 09:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-24312</guid>
		<description>Thanks very much for the info. After googling this topic for the whole morning, it&#039;s the only simple and easy approach that I could find.</description>
		<content:encoded><![CDATA[<p>Thanks very much for the info. After googling this topic for the whole morning, it&#8217;s the only simple and easy approach that I could find.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daryl</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-20993</link>
		<dc:creator>Daryl</dc:creator>
		<pubDate>Tue, 17 Aug 2010 10:48:53 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-20993</guid>
		<description>Hi AngelStreet,

   have you actually writtened/assigned/linked classes to the moviesclips? This has to be done as there is no way to put actionscript within movieclips anymore.

The main problem here, I think, is that the loader&#039;s content is still a movieclip class no matter what. So even if you grab the constructor of the loader&#039;s content, you&#039;ll just be getting the MovieClip constructor. Either do it my way, or one of the comments above may also help you.

Otherwise, you should try to limit the number of actionscript that goes into your loaded content.

You&#039;re right I have not touched ActionScript in quite awhile, but I hope this message helps.

Cheers
Daryl</description>
		<content:encoded><![CDATA[<p>Hi AngelStreet,</p>
<p>   have you actually writtened/assigned/linked classes to the moviesclips? This has to be done as there is no way to put actionscript within movieclips anymore.</p>
<p>The main problem here, I think, is that the loader&#8217;s content is still a movieclip class no matter what. So even if you grab the constructor of the loader&#8217;s content, you&#8217;ll just be getting the MovieClip constructor. Either do it my way, or one of the comments above may also help you.</p>
<p>Otherwise, you should try to limit the number of actionscript that goes into your loaded content.</p>
<p>You&#8217;re right I have not touched ActionScript in quite awhile, but I hope this message helps.</p>
<p>Cheers<br />
Daryl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AngelStreet</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-20963</link>
		<dc:creator>AngelStreet</dc:creator>
		<pubDate>Mon, 16 Aug 2010 15:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-20963</guid>
		<description>Hi,
I understand than your may be not still working with flash but I am desperate and dunno where to find an answer.

I am working on an isometric engine called IsoEngine. I need to duplicate an swf externally loaded. The problem is that after being loaded and duplicated the resulting movieClip lose all its embedded actionScript. Thus a clip containing 2 or more frames will loop infinitely regardless the stop() that you would have put on the targeted swf file.
I am using the following function to duplicate my swf loaded:

var targetClass:Class = Object(loader.content).constructor;
var duplicate:DisplayObject = new targetClass();

Any idea of how we could duplicate an swf and keep its own actionscript?

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I understand than your may be not still working with flash but I am desperate and dunno where to find an answer.</p>
<p>I am working on an isometric engine called IsoEngine. I need to duplicate an swf externally loaded. The problem is that after being loaded and duplicated the resulting movieClip lose all its embedded actionScript. Thus a clip containing 2 or more frames will loop infinitely regardless the stop() that you would have put on the targeted swf file.<br />
I am using the following function to duplicate my swf loaded:</p>
<p>var targetClass:Class = Object(loader.content).constructor;<br />
var duplicate:DisplayObject = new targetClass();</p>
<p>Any idea of how we could duplicate an swf and keep its own actionscript?</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wissam</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-19530</link>
		<dc:creator>Wissam</dc:creator>
		<pubDate>Mon, 14 Jun 2010 08:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-19530</guid>
		<description>Thanks man, i apreciate your blog.
I just wish there was a way to duplicate an instance of a loader not an entire SWF where u need to create new SWF for each image you want to introduce.</description>
		<content:encoded><![CDATA[<p>Thanks man, i apreciate your blog.<br />
I just wish there was a way to duplicate an instance of a loader not an entire SWF where u need to create new SWF for each image you want to introduce.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-19214</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 03 Jun 2010 00:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-19214</guid>
		<description>Thanks very much for the article, it has saved our team quite a bit of headache. Our appreciation knows no bounds. This should be the first Google result for &quot;duplicating dynamically loaded clips&quot;, assuming other people tried that one too.</description>
		<content:encoded><![CDATA[<p>Thanks very much for the article, it has saved our team quite a bit of headache. Our appreciation knows no bounds. This should be the first Google result for &#8220;duplicating dynamically loaded clips&#8221;, assuming other people tried that one too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-16968</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 01 Apr 2010 15:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-16968</guid>
		<description>Thanks for your help Daryl! :)

&quot;Have you tried instantiating a new Loader?&quot;

Yeah, every time an item is clicked in the combo box, an itemSelected() function is called with:

loader = new Loader();

However, I think I found the problem!

My library assets are assigned to sound classes via:

sndClass=Class(this.loaderInfo.applicationDomain.getDefinition(&lt;b&gt;“Track1?&lt;/b&gt;))

It seems that after the first song (and its corresponding sounds) are loaded, then &lt;b&gt;&quot;Track1&quot;&lt;/b&gt; is floating around in memory permanently assigned to the sound class &quot;Track1&quot; which was in the first song!  I wanted to keep the classes in each song .swf hardcoded as &quot;Track1&quot;, &quot;Track2&quot;, Track3&quot;, etc... but I`m afraid that this won`t work.

Is there any way to break the link between these class names and the &quot;first&quot; song`s sound classes and clear these out of memory each time a new song is loaded, so that I can reassign them to the new song?

Thanks again,

Matt</description>
		<content:encoded><![CDATA[<p>Thanks for your help Daryl! <img src='http://darylteo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8220;Have you tried instantiating a new Loader?&#8221;</p>
<p>Yeah, every time an item is clicked in the combo box, an itemSelected() function is called with:</p>
<p>loader = new Loader();</p>
<p>However, I think I found the problem!</p>
<p>My library assets are assigned to sound classes via:</p>
<p>sndClass=Class(this.loaderInfo.applicationDomain.getDefinition(<b>“Track1?</b>))</p>
<p>It seems that after the first song (and its corresponding sounds) are loaded, then <b>&#8220;Track1&#8243;</b> is floating around in memory permanently assigned to the sound class &#8220;Track1&#8243; which was in the first song!  I wanted to keep the classes in each song .swf hardcoded as &#8220;Track1&#8243;, &#8220;Track2&#8243;, Track3&#8243;, etc&#8230; but I`m afraid that this won`t work.</p>
<p>Is there any way to break the link between these class names and the &#8220;first&#8221; song`s sound classes and clear these out of memory each time a new song is loaded, so that I can reassign them to the new song?</p>
<p>Thanks again,</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daryl</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-16959</link>
		<dc:creator>Daryl</dc:creator>
		<pubDate>Thu, 01 Apr 2010 06:18:51 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-16959</guid>
		<description>Have you tried instantiating a new Loader? That might just be the ticket... :)

Cheers
Daryl</description>
		<content:encoded><![CDATA[<p>Have you tried instantiating a new Loader? That might just be the ticket&#8230; <img src='http://darylteo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers<br />
Daryl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/comment-page-1/#comment-16945</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 31 Mar 2010 17:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/#comment-16945</guid>
		<description>Daryl,

Thanks for the good info.!

Do you know about unloading library assets accessed through a loaded swf at runtime.  I am having trouble with &quot;unloading&quot; a loader object.
 
I am building a mixer/remixer application where the user can select (and load) a song to remix from a combo box. A song is composed of 10 mp3s embedded in a .swf file.  When the user selects a song, the .swf file is loaded into a &quot;loader&quot; object and then  the sound classes in the embedded swf are assigned to sound objects via &lt;b&gt;this.loaderInfo.applicationDomain.getDefinition(&quot;Track1&quot;)&lt;/b&gt;

The first time a song is loaded it works fine, however, when the user selects another song it fails to load. What I mean is that the original song still seems to be in memory - I have a progress bar and it appears to load the new song, but after it loads, the original song still plays.
 
I have tried &quot;loader.unloadAndStop()&quot;, &quot;loader=null&quot;, as well as setting all the sound objects in the main swf to &quot;null&quot; before the load, but nothing seems to work!  This driving me crazy and I`m starting to get frustrated!  Is there any way I can override the previous &quot;loader&quot; data in memory and get at the new swf file?  I can post/send code if you like!

Thanks a lot!

Matt</description>
		<content:encoded><![CDATA[<p>Daryl,</p>
<p>Thanks for the good info.!</p>
<p>Do you know about unloading library assets accessed through a loaded swf at runtime.  I am having trouble with &#8220;unloading&#8221; a loader object.</p>
<p>I am building a mixer/remixer application where the user can select (and load) a song to remix from a combo box. A song is composed of 10 mp3s embedded in a .swf file.  When the user selects a song, the .swf file is loaded into a &#8220;loader&#8221; object and then  the sound classes in the embedded swf are assigned to sound objects via <b>this.loaderInfo.applicationDomain.getDefinition(&#8220;Track1&#8243;)</b></p>
<p>The first time a song is loaded it works fine, however, when the user selects another song it fails to load. What I mean is that the original song still seems to be in memory &#8211; I have a progress bar and it appears to load the new song, but after it loads, the original song still plays.</p>
<p>I have tried &#8220;loader.unloadAndStop()&#8221;, &#8220;loader=null&#8221;, as well as setting all the sound objects in the main swf to &#8220;null&#8221; before the load, but nothing seems to work!  This driving me crazy and I`m starting to get frustrated!  Is there any way I can override the previous &#8220;loader&#8221; data in memory and get at the new swf file?  I can post/send code if you like!</p>
<p>Thanks a lot!</p>
<p>Matt</p>
]]></content:encoded>
	</item>
</channel>
</rss>

