<?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>d.CAT- the RIA blog &#187; actionscript</title>
	<atom:link href="http://ria.richtechmedia.com/category/flash/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://ria.richtechmedia.com</link>
	<description>a dedicated Flash&#124;Flex Rich Internet Application Blog from a senior Flex RIA developer/instructor</description>
	<lastBuildDate>Wed, 07 Apr 2010 02:39:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>本日速記 &#8211; Singleton vs. Static 的優劣</title>
		<link>http://ria.richtechmedia.com/2006/04/10/%e6%9c%ac%e6%97%a5%e9%80%9f%e8%a8%98-singleton-vs-static-%e7%9a%84%e5%84%aa%e5%8a%a3/</link>
		<comments>http://ria.richtechmedia.com/2006/04/10/%e6%9c%ac%e6%97%a5%e9%80%9f%e8%a8%98-singleton-vs-static-%e7%9a%84%e5%84%aa%e5%8a%a3/#comments</comments>
		<pubDate>Mon, 10 Apr 2006 03:04:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/2006/04/10/%e6%9c%ac%e6%97%a5%e9%80%9f%e8%a8%98-singleton-vs-static-%e7%9a%84%e5%84%aa%e5%8a%a3/</guid>
		<description><![CDATA[原文
這真是一篇有趣的文章，關於何時該用 singleton 與  static 的問題我也已經想很久。
早期我習慣用 Static class 做為中央儲存地(dump site ?)，例如把utility methods, prop, constant 都塞在裏面，這樣方便存取。
但在 flex 2 早期的幾個版本裏，static class無法透過 binding 整合到 view去，再加上 Cairngorm 2 出來後 ModelLocator 一律採用 singleton設計，那時究其原因也是為了解決 static prop/method 無法 binding 的問題。
正當我們想全面轉換成 singleton時，flex 2 beta 2 出來了，adobe 很勤快的解決了  static prop binding issue，所以之前的老方法又可以繼續使用。
這下子就陷入兩難，需要在兩者間做點選擇：到底該繼續用 static class就好？或是follow Cairngorm 的 singleton ? 當然後來我們已經有了答案，但先來看看這篇文章講了什麼。
這篇文章的基本要意就是： singleton 的彈性比較大，在可能的情況下應該儘量用 singleton而非 static. [...]]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2006/04/10/%e6%9c%ac%e6%97%a5%e9%80%9f%e8%a8%98-singleton-vs-static-%e7%9a%84%e5%84%aa%e5%8a%a3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>crash course &#8211; AS3</title>
		<link>http://ria.richtechmedia.com/2006/03/11/crash-course-as3/</link>
		<comments>http://ria.richtechmedia.com/2006/03/11/crash-course-as3/#comments</comments>
		<pubDate>Sat, 11 Mar 2006 03:19:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=336</guid>
		<description><![CDATA[- 使用 Flex Builder 建立 AS3 project
- 使用 FB2 開發、編譯與除錯程式
- AS3的全新 Class架構 與 繼承順序 簡介
- AS3新增 &#8211; Package 簡介
- AS3新增 &#8211; flash.display 與 flash.geom
- AS3新增 &#8211; DisplayList
- AS3應用範例  &#8211; 使用 DisplayList 建立文字框與顯示於畫面
- AS3新增  &#8211; Sprite (MovieClip is not the only choice anymore)
- AS3新增關鍵字 internal, public, protected 以及 private keyword的消失
- AS3應用範例 &#8211; 如何建立 Singleton [...]]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2006/03/11/crash-course-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>本日必讀 &#8211; ActionScript 2.0 Best Practices</title>
		<link>http://ria.richtechmedia.com/2006/02/23/%e6%9c%ac%e6%97%a5%e5%bf%85%e8%ae%80-actionscript-20-best-practices/</link>
		<comments>http://ria.richtechmedia.com/2006/02/23/%e6%9c%ac%e6%97%a5%e5%bf%85%e8%ae%80-actionscript-20-best-practices/#comments</comments>
		<pubDate>Thu, 23 Feb 2006 04:04:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=329</guid>
		<description><![CDATA[ActionScript 2.0 Best Practices (單頁方便列印版) 
正在想如何重新改寫教材，現在問題解決一半了 Orz
只是現在才推這篇文章有沒有太慢了點，AS3 is right at the not so far corner&#8230;
]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2006/02/23/%e6%9c%ac%e6%97%a5%e5%bf%85%e8%ae%80-actionscript-20-best-practices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>flash 8 自製 modal window</title>
		<link>http://ria.richtechmedia.com/2006/02/14/flash-8-%e8%87%aa%e8%a3%bd-modal-window/</link>
		<comments>http://ria.richtechmedia.com/2006/02/14/flash-8-%e8%87%aa%e8%a3%bd-modal-window/#comments</comments>
		<pubDate>Tue, 14 Feb 2006 06:46:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=324</guid>
		<description><![CDATA[範例下載
在flash 裏要產生 modal window(只有前景的視窗可操作，背景所有東西都不能按)有兩種方式，一種是用 PopUpManager，另一種是用 Alert.create()。
一般正常用法是先透過 PopUpManager 產生一個 Window 元件，然後再用 Window.contentPath = xxx 將自已的東西放進去。
但這個做法有個缺點，如果你不想要那個固定格式(灰底 + titlebar)的視窗，就要很辛苦的動點手腳重新 skinning。
最近有個案子又需要這種功能，但設計師(hi Brad!)需要用自已的mc視窗，因此我寫了個小工具可以隨意指定自製的mc 成為 modal window, 原理其實很簡單，就是把 mx.managers.PopUpManager 打開讀完一遍懂了後就知道，讀完後就會知道其實 adobe 的工程師已經寫好許多方便的小程式等者被用，例如
1. DepthManager 裏面有 setDepthBelow(), createChildAtDepth()等程式可用
2. 這些 Manager都會隨者 Window 元件一起以 mixins 的方式加MovieClip身上。
如果你沒時間再走一遍整個流程，看看這個超短簡介也可以，基本上產生一個modal window的過程如下：
1、先產生一片超大的白色mc把整個畫面(Stage size)蓋住，然後在它身上吃掉所有的 mouse click event。
2、用 setDepthBelow() 將剛才產生的白底mc 移到 自製mc 的下方，這支程式會很聰明的將 自製mc 移到剛才 白色mc的上一層。
PLAIN TEXT
Actionscript:




/*


usage:


@parent: 以那個mc為基準建立 modal window


@mc: 要成為 modal [...]]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2006/02/14/flash-8-%e8%87%aa%e8%a3%bd-modal-window/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FMS2回傳 recordset 注意事項</title>
		<link>http://ria.richtechmedia.com/2006/01/03/fms2%e5%9b%9e%e5%82%b3-recordset-%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85/</link>
		<comments>http://ria.richtechmedia.com/2006/01/03/fms2%e5%9b%9e%e5%82%b3-recordset-%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85/#comments</comments>
		<pubDate>Tue, 03 Jan 2006 03:34:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flashcom]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=316</guid>
		<description><![CDATA[amfphp的作者Patrick Mineault 今天貼了一篇關於 FMS2回傳 recordset的文章。
主要重點是當資料流向是 amfphp -> FMS2 -> flash player 時，
FMS2 與 flash player 分別會建立新的 recordset 物件來承載這些 resultset，但在兩次的轉換過程中，recordset.items 這個 getter 會被混謠，導致最後在 flash player裏用 recordset.items 是讀不到資料的。
之前我也曾大量使用類似這樣的三階式流程，但從來沒試過將 resultset 先傳回 flashcom 再丟回 flash player, 比較常見的劇情是 resultset (例如會員資料)傳到 flashcom後就留在那裏，所以不曾碰過patrick的這個問題，但將來顯然有機會碰到所以先記一筆備用。
不過，recordset 是一個已經正式宣告死亡的東西(不論在 AS3 或 Flex 2裏)，所以最安全保險的做法就是自已先在server端生成 array of objects 再回傳，這樣不論要傳幾階都保証可久放不變質  
]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2006/01/03/fms2%e5%9b%9e%e5%82%b3-recordset-%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>colin moock 寫新書 &#8211; Essential AS3</title>
		<link>http://ria.richtechmedia.com/2005/11/15/colin-moock-%e5%af%ab%e6%96%b0%e6%9b%b8-essential-as3/</link>
		<comments>http://ria.richtechmedia.com/2005/11/15/colin-moock-%e5%af%ab%e6%96%b0%e6%9b%b8-essential-as3/#comments</comments>
		<pubDate>Tue, 15 Nov 2005 07:31:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=297</guid>
		<description><![CDATA[網站
preview
preview裏是將 EAS2裏面的 photoviewer 改寫成 AS3.0。
這代表趙英傑桑又要開始忙了嗎？  
]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2005/11/15/colin-moock-%e5%af%ab%e6%96%b0%e6%9b%b8-essential-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3的改變</title>
		<link>http://ria.richtechmedia.com/2005/10/25/as3%e7%9a%84%e6%94%b9%e8%ae%8a/</link>
		<comments>http://ria.richtechmedia.com/2005/10/25/as3%e7%9a%84%e6%94%b9%e8%ae%8a/#comments</comments>
		<pubDate>Tue, 25 Oct 2005 03:48:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=282</guid>
		<description><![CDATA[AS3除了帶來全新的DOM外，另一個大革新就是 Event Model。
以往在AS1/2裏，處理事件的方式有百百種，但基本上就是：
PLAIN TEXT
Actionscript:




btn.onRelease = function&#40;&#41;&#123;


&#160; &#160; //do something


&#125; 






或是 
PLAIN TEXT
Actionscript:




Mouse.addListener&#40;someListener&#41;;


function someListener&#40;&#41;&#123;


&#160; &#160; &#160;//do...


&#125; 






而使用V2 components時，處理方式又變成 
PLAIN TEXT
Actionscript:




btn.addEventListener&#40;"click", doClick&#41;; 






這些不一致性往往讓新手倍感頭痛(好吧，其實老手才更是咬牙切齒...)不知標準在那。
從AS3開始，flash的世界將只有一種Event Model，也就是V2 元件用的那種，而為了慣徹這種設計理念，整個Actionscript Class的架構都做了大改變，我們可以從下面的class tree看出來。

Object
    &#124;
    +--flash.events.EventDispatcher
         &#124;
         +--flash.display.DisplayObject
     [...]]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2005/10/25/as3%e7%9a%84%e6%94%b9%e8%ae%8a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A New Era Begins&#8230;</title>
		<link>http://ria.richtechmedia.com/2005/10/17/a-new-era-begins/</link>
		<comments>http://ria.richtechmedia.com/2005/10/17/a-new-era-begins/#comments</comments>
		<pubDate>Mon, 17 Oct 2005 08:00:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=279</guid>
		<description><![CDATA[
alright,  ladies and gentlemen, let me introduce you Lab Macromedia
美國西岸時間十月十七日凌晨十二時，RIA的新時代正式開始。
macromedia在三十八鐘前開放下一代 flex builder 2 與 flash player 8.5 下載，這是macromedia有史以來第一次在產品還在開發階段就展開的public alpha, 意思是所有人現在就可以開始試試未來的玩具。
這個 public alpha為何意義重大呢？
首先，這是 flash player 8.5第一次曝露在大眾面前，而這個版本是flash有史以來最大幅度的改版，簡單來說就是整個 Actionscript Virtual Machine (以後簡稱AVM)的核心都全部改寫。
至於改寫的目地，當然就是為了支援 Actionscript 3.0 ，AS3 也同樣經歷了前所未有的大改革，全部的class package都完全改掉，同時加入了更多現代語言嚴謹的特色，使得它不論是語法、使用方式與表現都更像Java語言了。
那為何說這是一個新時代的開始呢？
答案很簡單，AS3 + FP8.5，代表的是flash正式成為一個robust enough的VM，也可以說是至此 Flash Platform終於齊備了所有商業平台所需要的要件，例如開發工具、程式語言、執行速度與效能表現，從今天之後，業界終於可以將flash pla
從今天起，我將每天一篇(或時間許可，數篇)專文介紹Flex Builder 2, Flash Player 8.5 與 Actionscript 3.0的種種細節，看完之後你就會瞭解為何我會用如此篤定的標題來型容這件事。
當然在文章還沒發表前，你可以先去下載一份軟體
試試，體驗一下全新的震撼吧  
]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2005/10/17/a-new-era-begins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>scrollpane (與所有 List 系元件) 自動捲動小技巧</title>
		<link>http://ria.richtechmedia.com/2005/09/28/scrollpane-%e8%88%87%e6%89%80%e6%9c%89-list-%e7%b3%bb%e5%85%83%e4%bb%b6-%e8%87%aa%e5%8b%95%e6%8d%b2%e5%8b%95%e5%b0%8f%e6%8a%80%e5%b7%a7/</link>
		<comments>http://ria.richtechmedia.com/2005/09/28/scrollpane-%e8%88%87%e6%89%80%e6%9c%89-list-%e7%b3%bb%e5%85%83%e4%bb%b6-%e8%87%aa%e5%8b%95%e6%8d%b2%e5%8b%95%e5%b0%8f%e6%8a%80%e5%b7%a7/#comments</comments>
		<pubDate>Wed, 28 Sep 2005 03:57:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=262</guid>
		<description><![CDATA[今天遇到一個小問題，我希望當scrollpane裏面的項目增加時，scrollbar能自動捲到最底部。
結果把手冊翻一遍只找到 vPosition 可以控制 scrollbar的垂直位置，但沒說該怎麼定位到最底部。
後來想想不對，既然 textarea之類的元件能用 maxVPosition 與 maxHPosition兩個屬性，那mm沒有理由不在所有List系 (List, Combobox, DataGrid, Tree, Scrollpane)組件都加入這個屬性，因此我就實驗性質的打了：
PLAIN TEXT
Actionscript:




sp.vPosition = sp.maxVPosition; 






結果立刻成功，只要加上eventlisetener就可以在內容變動時自動捲動。
後來我順便用 maxVPosition 當關鍵字查了mm online doc與flashcoder，發現online doc裏仍然完全沒提，但flashcoder則有一篇討論，可見知道這招的人不多啊~(只是自動捲動不該是List元件最基本也最重要的功能之一嗎？怎麼會變成undocumented feature ?)
]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2005/09/28/scrollpane-%e8%88%87%e6%89%80%e6%9c%89-list-%e7%b3%bb%e5%85%83%e4%bb%b6-%e8%87%aa%e5%8b%95%e6%8d%b2%e5%8b%95%e5%b0%8f%e6%8a%80%e5%b7%a7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AMFPHP MS3 上架了</title>
		<link>http://ria.richtechmedia.com/2005/09/27/amfphp-ms3-%e4%b8%8a%e6%9e%b6%e4%ba%86/</link>
		<comments>http://ria.richtechmedia.com/2005/09/27/amfphp-ms3-%e4%b8%8a%e6%9e%b6%e4%ba%86/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 03:47:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://ria.richtechmedia.com/?p=259</guid>
		<description><![CDATA[下載
這次主要是修正AMF 序列化的支援度，並且加入server side resultset 的客製能力(要使用內建的 array class)。
]]></description>
		<wfw:commentRss>http://ria.richtechmedia.com/2005/09/27/amfphp-ms3-%e4%b8%8a%e6%9e%b6%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

