<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog @ AvantBiz Design &#187; Flash</title>
	<atom:link href="http://blog.avantbiz.com/category/computer/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.avantbiz.com</link>
	<description>Weblog about stuffs other than design</description>
	<lastBuildDate>Wed, 06 Jul 2011 02:45:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Dynamically loading bitmaps with smoothing in Flash Player 8</title>
		<link>http://blog.avantbiz.com/2009/03/11/dynamically-loading-bitmaps-with-smoothing-in-flash-player-8/</link>
		<comments>http://blog.avantbiz.com/2009/03/11/dynamically-loading-bitmaps-with-smoothing-in-flash-player-8/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 08:38:12 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Computer 電腦]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/?p=111</guid>
		<description><![CDATA[Function import flash.display.*; function loadBitmapSmoothed(url:String, target:MovieClip) { // Create a movie clip which will contain our unsmoothed bitmap var bmc:MovieClip = target.createEmptyMovieClip(&#8220;bmc&#8221;,target.getNextHighestDepth()); // Create a listener which will notify us when the bitmap loaded successfully var listener:Object = new Object(); // Track the target listener.tmc = target; // If the bitmap loaded successfully we redraw [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Function</strong></p>
<p>import flash.display.*;</p>
<p>function loadBitmapSmoothed(url:String, target:MovieClip) {<br />
	// Create a movie clip which will contain our unsmoothed bitmap<br />
	var bmc:MovieClip = target.createEmptyMovieClip(&#8220;bmc&#8221;,target.getNextHighestDepth());</p>
<p>	// Create a listener which will notify us when the bitmap loaded successfully<br />
	var listener:Object = new Object();<br />
	// Track the target<br />
	listener.tmc = target;</p>
<p>	// If the bitmap loaded successfully we redraw the movie into<br />
	// a BitmapData object and then attach that BitmapData to the target<br />
	// movie clip with the smoothing flag turned on.<br />
	listener.onLoadInit = function(mc:MovieClip) {<br />
		mc._visible = false;<br />
		var bitmap:BitmapData = new BitmapData(mc._width, mc._height, true);<br />
		this.tmc.attachBitmap(bitmap, this.tmc.getNextHighestDepth(),&#8221;auto&#8221;, true);<br />
		bitmap.draw(mc);<br />
	};</p>
<p>	// Do it, load the bitmap now<br />
	var loader:MovieClipLoader = new MovieClipLoader();<br />
	loader.addListener(listener);<br />
	loader.loadClip(url, bmc);<br />
}</p>
<p><strong>To use this snippet simple paste the function into your code and then load a bitmap this way f.ex.:</strong><br />
loadBitmapSmoothed(&#8220;flash.png&#8221;, mc1.mc);</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2009/03/11/dynamically-loading-bitmaps-with-smoothing-in-flash-player-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Html parm in Flash movie</title>
		<link>http://blog.avantbiz.com/2008/01/16/display-html-parm-in-flash-movie-2/</link>
		<comments>http://blog.avantbiz.com/2008/01/16/display-html-parm-in-flash-movie-2/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 04:24:13 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2008/01/16/display-html-parm-in-flash-movie-2/</guid>
		<description><![CDATA[http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14808&#038;sliceId=2~]]></description>
			<content:encoded><![CDATA[<p><a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14808&#038;sliceId=2" rel="nofollow" >http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14808&#038;sliceId=2</a>~</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2008/01/16/display-html-parm-in-flash-movie-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode show in Flash</title>
		<link>http://blog.avantbiz.com/2008/01/16/unicode-show-in-flash/</link>
		<comments>http://blog.avantbiz.com/2008/01/16/unicode-show-in-flash/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 03:01:58 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2008/01/16/unicode-show-in-flash/</guid>
		<description><![CDATA[1.System.useCodepage = false; 2.XML convert to Unicode 3.Choose &#8220;use device fonts&#8221; in flash text box more details show in the following link http://www.adobe.com/support/flash/languages/unicode_in_flmx/unicode_in_flmx11.html]]></description>
			<content:encoded><![CDATA[<p>1.System.useCodepage = false;</p>
<p>2.XML convert to Unicode</p>
<p>3.Choose &#8220;use device fonts&#8221; in flash text box</p>
<p>more details show in the following link<br />
<a href="http://www.adobe.com/support/flash/languages/unicode_in_flmx/unicode_in_flmx11.html" rel="nofollow" >http://www.adobe.com/support/flash/languages/unicode_in_flmx/unicode_in_flmx11.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2008/01/16/unicode-show-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Player 各版本的使用率</title>
		<link>http://blog.avantbiz.com/2007/04/04/flash-player/</link>
		<comments>http://blog.avantbiz.com/2007/04/04/flash-player/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 03:33:52 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Computer 電腦]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2007/04/04/flash-player-%e5%90%84%e7%89%88%e6%9c%ac%e7%9a%84%e4%bd%bf%e7%94%a8%e7%8e%87/</guid>
		<description><![CDATA[Macromedia Flash content reaches 97.6% of Internet viewers http://www.macromedia.com/software/player_census/flashplayer/ Worldwide Ubiquity of Macromedia Flash by Version http://www.macromedia.com/software/player_census/flashplayer/version_penetration.html]]></description>
			<content:encoded><![CDATA[<p>Macromedia Flash content reaches 97.6% of Internet viewers<br />
<a href="http://www.macromedia.com/software/player_census/flashplayer/" rel="nofollow" >http://www.macromedia.com/software/player_census/flashplayer/</a></p>
<p>Worldwide Ubiquity of Macromedia Flash by Version<br />
<a href="http://www.macromedia.com/software/player_census/flashplayer/version_penetration.html" rel="nofollow" >http://www.macromedia.com/software/player_census/flashplayer/version_penetration.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2007/04/04/flash-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding the changes in the display API in ActionScript 3.0</title>
		<link>http://blog.avantbiz.com/2007/04/04/understanding-the-changes-in-the-display-api-in-actionscript-30/</link>
		<comments>http://blog.avantbiz.com/2007/04/04/understanding-the-changes-in-the-display-api-in-actionscript-30/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 03:12:46 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Computer 電腦]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2007/04/04/understanding-the-changes-in-the-display-api-in-actionscript-30/</guid>
		<description><![CDATA[官網的一篇基礎教學： http://www.adobe.com/devnet/actionscript/articles/display_api.html 針對 display 在 AS2 與 AS3 之間的改變。 要注意的重點在於： 1. 以前我們觀念中都是對 MovieClip 在作事情，現在要想像 所做的事情 都是發生在 記憶體 中，然後 必須 將做出來的東西 加到 某個 Container 中，才會顯示在 Stage 上。 2. 以前的 MovieClip，現在已經被重構其繼承架構，所以若是你要做的事情不是太複雜，不需要真的產生一個完整的 MC 的話，其實可以考慮建立其父類別的物件，譬如 Sprite。 3. 繪圖 API，也不再是直接透過 MovieClip 進行，而要透過 graphics 達到，這點，知道一下即可。 4. 事件處理程序，你必須越來越習慣 addEventListener，知道一下即可。]]></description>
			<content:encoded><![CDATA[<p>官網的一篇基礎教學：</p>
<p><a href="http://www.adobe.com/devnet/actionscript/articles/display_api.html" rel="nofollow" >http://www.adobe.com/devnet/actionscript/articles/display_api.html</a></p>
<p>針對 display 在 AS2 與 AS3 之間的改變。</p>
<p>要注意的重點在於：</p>
<p>1. 以前我們觀念中都是對 MovieClip 在作事情，現在要想像 所做的事情 都是發生在 記憶體 中，然後 必須 將做出來的東西 加到 某個 Container 中，才會顯示在 Stage 上。</p>
<p>2. 以前的 MovieClip，現在已經被重構其繼承架構，所以若是你要做的事情不是太複雜，不需要真的產生一個完整的 MC 的話，其實可以考慮建立其父類別的物件，譬如 Sprite。</p>
<p>3. 繪圖 API，也不再是直接透過 MovieClip 進行，而要透過 graphics 達到，這點，知道一下即可。</p>
<p>4. 事件處理程序，你必須越來越習慣 addEventListener，知道一下即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2007/04/04/understanding-the-changes-in-the-display-api-in-actionscript-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Fix IE 7 Flash bug</title>
		<link>http://blog.avantbiz.com/2007/01/25/how-to-fix-ie-7-flash-bug/</link>
		<comments>http://blog.avantbiz.com/2007/01/25/how-to-fix-ie-7-flash-bug/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 15:23:11 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Computer 電腦]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Web 網頁]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2007/01/25/how-to-fix-ie-7-flash-bug/</guid>
		<description><![CDATA[Adobe’s Developer Center has tackled this issue: http://www.adobe.com/devnet/activecontent/ http://blog.deconcept.com/flashobject/]]></description>
			<content:encoded><![CDATA[<p>Adobe’s Developer Center has tackled this issue:<br />
<a href="http://www.adobe.com/devnet/activecontent/" rel="nofollow">http://www.adobe.com/devnet/activecontent/</a></p>
<p><a href="http://blog.deconcept.com/flashobject/" rel="nofollow">http://blog.deconcept.com/flashobject/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2007/01/25/how-to-fix-ie-7-flash-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript 3 QuickTip #2: The Timer Class</title>
		<link>http://blog.avantbiz.com/2006/12/19/actionscript-3-quicktip-2-the-timer-class/</link>
		<comments>http://blog.avantbiz.com/2006/12/19/actionscript-3-quicktip-2-the-timer-class/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 16:26:24 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Computer 電腦]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2006/12/19/actionscript-3-quicktip-2-the-timer-class/</guid>
		<description><![CDATA[In previous version of ActionScript there were a couple of different ways to trigger events based on time. The setInterval() and setTimeout() functions were the two most commonly used ways of calling a function after a specified amount of time had lapsed. In ActionScript 3 we now have the Timer class which lives in the [...]]]></description>
			<content:encoded><![CDATA[<p>In previous version of ActionScript there were a couple of different ways to trigger events based on time. The setInterval() and setTimeout() functions were the two most commonly used ways of calling a function after a specified amount of time had lapsed. In ActionScript 3 we now have the <a href="http://livedocs.macromedia.com/flex/2/langref/flash/utils/Timer.html" rel="nofollow" >Timer</a> class which lives in the <em><a href="http://livedocs.macromedia.com/flex/2/langref/flash/utils/package-detail.html" rel="nofollow" >flash.utils</a></em> package. This class contains all the functionality that you will ever need for time-based applications. In order to use the class, you first must import the <em><a href="http://livedocs.macromedia.com/flex/2/langref/flash/utils/package-detail.html" rel="nofollow" >flash.utils</a></em> package as seen is the example below. The <a href="http://livedocs.macromedia.com/flex/2/langref/flash/utils/Timer.html" rel="nofollow" >Timer</a> constructor expects one argument that represents the desired delay in milliseconds between function calls. An optional seconds argument determines the number of times to call the function. The default for this value is 0, which means that it will call the function indefinitely. If you wanted to replicate the functionality of the deprecated setTimeout() function, you can simply pass 1 as the value for this parameter.</p>
<p>In my example below I am creating a Timer that will fire twice a second, but I haven&#8217;t yet told it what function to call every time the delay has passed. To do this we need to respond to the <em>timer</em> event of the Timer class and give it the name of the function that will handle the event. At this point our Timer will be setup for use but we still need to call the Timer.start() method in order to get things started. In my implementation below I am simply doing a trace() to the output window every time the Timer fires showing how many times it has fired. To get this value I am reading the Timer.currentCount property.</p>
<div>Actionscript:   </p>
<div>
<div>
<ol>
<li>
<div>// We need to import the utils package</div>
</li>
<li>
<div>import flash.utils.*;</div>
</li>
<li>
<div>// Create a new Timer object with a delay of 500 ms</div>
</li>
<li>
<div>var myTimer:Timer = new Timer(500);</div>
</li>
<li>
<div>myTimer.addEventListener(&#8220;timer&#8221;, timedFunction);</div>
</li>
<li>
<div>// Start the timer</div>
</li>
<li>
<div>myTimer.start();</div>
</li>
<li>
<div>// Function will be called every 500 milliseconds</div>
</li>
<li>
<div>function timedFunction(eventArgs:TimerEvent)</div>
</li>
<li>
<div>{</div>
</li>
<li>
<div>        trace(&#8220;Timer fired &#8221; + myTimer.currentCount + &#8221; times.&#8221;);</div>
</li>
<li>
<div>}</div>
</li>
</ol>
</div>
</div>
<p>Check out the <a href="http://livedocs.macromedia.com/flex/2/langref/" rel="nofollow" >AS 3 docs</a> to see all of the available properties and methods of this great new class.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2006/12/19/actionscript-3-quicktip-2-the-timer-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript 3 QuickTip #1: Dynamic Frame Rates</title>
		<link>http://blog.avantbiz.com/2006/12/14/actionscript-3-quicktip-4-dynamic-frame-rates/</link>
		<comments>http://blog.avantbiz.com/2006/12/14/actionscript-3-quicktip-4-dynamic-frame-rates/#comments</comments>
		<pubDate>Thu, 14 Dec 2006 11:54:54 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[Computer 電腦]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.avantbiz.com/2006/12/14/actionscript-3-quicktip-4-dynamic-frame-rates/</guid>
		<description><![CDATA[ActionScript 3 QuickTip #1: Dynamic Frame Rates This is a *very* cool new feature in ActionScript 3. We now have the ability to dynamically change the SWF frame rate at runtime using ActionScript. In the example below I have a somewhat creepy clown who is animating from side-to-side on the screen. You can use the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ActionScript 3 QuickTip #1: Dynamic Frame Rates</strong></p>
<p>This is a *very* cool new feature in ActionScript 3. We now have the ability to dynamically change the SWF frame rate at runtime using ActionScript. In the example below I have a somewhat creepy clown who is animating from side-to-side on the screen. You can use the slider to change the frame rate from 0 to 800 and something. There are a lot of applications for this such as lowering the frame rate for slower machines dynamically. The AS 3 code from the example is posted below:</p>
<ol>
<li>
<div>this.stage.frameRate = 0;</div>
</li>
<li>
<div>rate.text = “0 fps”;</div>
</li>
<li>
<div>thumb.addEventListener(MouseEvent.MOUSE_DOWN, starter);</div>
</li>
<li>
<div>thumb.addEventListener(MouseEvent.MOUSE_UP, stopper);</div>
</li>
<li>
<div>thumb.addEventListener(MouseEvent.MOUSE_OUT, stopper);</div>
</li>
<li>
<div>thumb.addEventListener(MouseEvent.MOUSE_MOVE, mover);</div>
</li>
<li>
<div>function starter(args:Event)</div>
</li>
<li>
<div>{</div>
</li>
<li>
<div>        thumb.startDrag(false, new Rectangle(track.x, thumb.y, track.width, 0));</div>
</li>
<li>
<div>}</div>
</li>
<li>
<div>function stopper(args:Event)</div>
</li>
<li>
<div>{</div>
</li>
<li>
<div>        thumb.stopDrag();</div>
</li>
<li>
<div>}</div>
</li>
<li>
<div>function mover(args:Event)</div>
</li>
<li>
<div>{</div>
</li>
<li>
<div>        var dist:Number = (thumb.x &#8211; track.x) / (track.width + track.x);</div>
</li>
<li>
<div>        this.stage.frameRate = Math.round(dist*1000);</div>
</li>
<li>
<div>        rate.text = Math.round(dist*1000).toString() + ” fps”;</div>
</li>
<li>
<div>}</div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.avantbiz.com/2006/12/14/actionscript-3-quicktip-4-dynamic-frame-rates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

