<?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: 每日必看blog 一枚 - Tinic Uro</title>
	<atom:link href="http://ria.richtechmedia.com/2005/08/21/%e6%af%8f%e6%97%a5%e5%bf%85%e7%9c%8bblog-%e4%b8%80%e6%9e%9a-tinic-uro/feed/" rel="self" type="application/rss+xml" />
	<link>http://ria.richtechmedia.com/2005/08/21/%e6%af%8f%e6%97%a5%e5%bf%85%e7%9c%8bblog-%e4%b8%80%e6%9e%9a-tinic-uro/</link>
	<description>a dedicated Flash&#124;Flex Rich Internet Application Blog from a senior Flex RIA developer/instructor</description>
	<pubDate>Wed, 07 Jan 2009 06:54:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 小布</title>
		<link>http://ria.richtechmedia.com/2005/08/21/%e6%af%8f%e6%97%a5%e5%bf%85%e7%9c%8bblog-%e4%b8%80%e6%9e%9a-tinic-uro/comment-page-1/#comment-304</link>
		<dc:creator>小布</dc:creator>
		<pubDate>Tue, 30 Aug 2005 09:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=221#comment-304</guid>
		<description>可素...有時用Button元件來作..挺好用的溜~
像SKIP、REPLAY、ENTER..哈哈哈@@</description>
		<content:encoded><![CDATA[<p>可素&#8230;有時用Button元件來作..挺好用的溜~<br />
像SKIP、REPLAY、ENTER..哈哈哈@@</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremy</title>
		<link>http://ria.richtechmedia.com/2005/08/21/%e6%af%8f%e6%97%a5%e5%bf%85%e7%9c%8bblog-%e4%b8%80%e6%9e%9a-tinic-uro/comment-page-1/#comment-241</link>
		<dc:creator>jeremy</dc:creator>
		<pubDate>Thu, 25 Aug 2005 17:18:07 +0000</pubDate>
		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=221#comment-241</guid>
		<description>謝謝tanjun的回答。

根據很久前在 flashcoder上看到的解決方法，基本上是用 swapDepths()將authoring time建立的 movieclip 由負數的level移到正數的level，就可以用 removeMovieClip()拿掉了。

但要注意那串文章中的範例使用這句：
btn.swapDepths(this.getNextHighestDepth());
這可能會造成另一個麻煩，因為 getNextHighestDepth()非常邪惡，很有可能將這個btn給移到某個特定的空間中，然後就再也reference不到了，如果一定要用這個function，至少得拿掉前面的 this，不然它是以btn為基礎去做swapDepths。

另外討論中提到btn的問題，感覺上不是很嚴重，因為這年頭應該很少人還在用button做btn，大部份都應該改用mc做btn了，但想到用 __proto__ 騙過compiler將它當mc處理確實很聰明啊~

最後那個reply中說可以用 unloadMovie(btn)移掉btn，然後再加個 btn = undefind，這兩句都不正確。首先 unloadMovie(btn)雖然在視覺上造成btn消失，但實際上它還正佔了記憶體，並且不會在下一次的GC中被移除，而加上一句 btn = undefind則是自欺欺人，這句等於是建了一個新的變數叫 btn，然後初始值是 undefined。

這一切只要跑下列語法就會被揭穿 :
for(i in _root){
trace(i);
}

從跑的結果中會發現原本的btn根本沒被移除啊~它還躲在某個地方繼續偷吃記憶體...

不過這到提醒我要用flash player 8試試，既然它宣稱是用 full collection做GC，那當 btn = undefind 或 delete btn被執行時，它就應該乖乖移掉這個reference...嗯 等試完再來寫結果。</description>
		<content:encoded><![CDATA[<p>謝謝tanjun的回答。</p>
<p>根據很久前在 flashcoder上看到的解決方法，基本上是用 swapDepths()將authoring time建立的 movieclip 由負數的level移到正數的level，就可以用 removeMovieClip()拿掉了。</p>
<p>但要注意那串文章中的範例使用這句：<br />
btn.swapDepths(this.getNextHighestDepth());<br />
這可能會造成另一個麻煩，因為 getNextHighestDepth()非常邪惡，很有可能將這個btn給移到某個特定的空間中，然後就再也reference不到了，如果一定要用這個function，至少得拿掉前面的 this，不然它是以btn為基礎去做swapDepths。</p>
<p>另外討論中提到btn的問題，感覺上不是很嚴重，因為這年頭應該很少人還在用button做btn，大部份都應該改用mc做btn了，但想到用 __proto__ 騙過compiler將它當mc處理確實很聰明啊~</p>
<p>最後那個reply中說可以用 unloadMovie(btn)移掉btn，然後再加個 btn = undefind，這兩句都不正確。首先 unloadMovie(btn)雖然在視覺上造成btn消失，但實際上它還正佔了記憶體，並且不會在下一次的GC中被移除，而加上一句 btn = undefind則是自欺欺人，這句等於是建了一個新的變數叫 btn，然後初始值是 undefined。</p>
<p>這一切只要跑下列語法就會被揭穿 :<br />
for(i in _root){<br />
trace(i);<br />
}</p>
<p>從跑的結果中會發現原本的btn根本沒被移除啊~它還躲在某個地方繼續偷吃記憶體&#8230;</p>
<p>不過這到提醒我要用flash player 8試試，既然它宣稱是用 full collection做GC，那當 btn = undefind 或 delete btn被執行時，它就應該乖乖移掉這個reference&#8230;嗯 等試完再來寫結果。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanjun</title>
		<link>http://ria.richtechmedia.com/2005/08/21/%e6%af%8f%e6%97%a5%e5%bf%85%e7%9c%8bblog-%e4%b8%80%e6%9e%9a-tinic-uro/comment-page-1/#comment-240</link>
		<dc:creator>tanjun</dc:creator>
		<pubDate>Thu, 25 Aug 2005 16:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=221#comment-240</guid>
		<description>雖然方法不是我想的，但是可以參考...
http://blog.masolin.com/?p=144</description>
		<content:encoded><![CDATA[<p>雖然方法不是我想的，但是可以參考&#8230;<br />
<a href="http://blog.masolin.com/?p=144" rel="nofollow">http://blog.masolin.com/?p=144</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremy</title>
		<link>http://ria.richtechmedia.com/2005/08/21/%e6%af%8f%e6%97%a5%e5%bf%85%e7%9c%8bblog-%e4%b8%80%e6%9e%9a-tinic-uro/comment-page-1/#comment-239</link>
		<dc:creator>jeremy</dc:creator>
		<pubDate>Tue, 23 Aug 2005 01:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=221#comment-239</guid>
		<description>呃 看來這題太難，似乎沒人有興趣回答...(還是其實這件事根本是做不到的啊~)</description>
		<content:encoded><![CDATA[<p>呃 看來這題太難，似乎沒人有興趣回答&#8230;(還是其實這件事根本是做不到的啊~)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
