2010年2月12日 星期五

Flex Menu客製化上下捲動子選單

這是實作Flex Menu加入客製化的上下捲動子選單, 在rollover up and down時捲動子選單.
以下為效果展示Demo:


(Read more...)

2010年2月11日 星期四

用XML當做Dictionary的key值取出為undfined?

昨天在做Dictionary測試時本來用xml當做key mapping, 結果卻發現用迴圈將xml內資料重新取出return的值卻是undefined.

目前還在找原因為何:S

以下為示範code:

(Read more...)

2010年2月6日 星期六

撲克牌牌型排列組合

最近迷上了一款iphone game : sword & poker, 這款遊戲是運用撲克牌牌型做組合給予敵人傷害的回合制rpg, 相當的耐玩.

因此這幾天花了點時間找資料研究關於撲克牌牌型的演算法, 以下為成果:


希望有機會也能來嘗試作作這類型的遊戲. :D


(Read more...)

2010年1月27日 星期三

QuickBox2D

QuickBox2D

QuickBox2D is a mini-library I created to work with Box2DFlashAS3. The main purpose of this library is to significantly simplify instantiation of rigid bodies and provide a simple way to skin rigid bodies with custom graphics.

可以讓你更為直覺快速建構Box2DFlashAS3物理碰撞環境.
讚! :D

(Read more...)

2010年1月26日 星期二

ListBase設定CSS後ComboxBox下拉選單字體顏色設定失效問題

在flex開發的專案中有用到css設定顏色的功能, 最近遇到ComboBox設定color下拉選單卻無法起作用的問題.後來發現如果在List組件 or ListBase 設CSS color, 會造成ComboBox設定CSS color失效, 造成的原因可能是ComboBox所顯示的下拉選單是ListBase Class的緣故.

我想這應該算是CSS繼承邏輯上的認知問題, 應該不算是什麼bug吧 :p
在這邊特此記錄一下以免又遇到相同狀況.
以下為示範的code :




(Read more...)

2010年1月17日 星期日

AS3 Data Structures For Game Developers (AS3DS)


AS3 Data Structures
AS3 Data Structures (code.google.com)

'AS3 Data Structures For Game Developers' is a package containing common data structures useful for flash game programming and application development. The project was started because I wanted a unified library which I could reuse in my games.

裡面定義許多可以運用的資料結構類別, 對開發遊戲相當地實用. 如果有機會能夠開發遊戲一定要好好研究一下:D

教學範例參考:

the graph class
the tree class
the queue class
the linked lists class 
more on linked list

(Read more...)

2010年1月11日 星期一

PushButton Engine + Box2DFlashAS3 小作品

上週末survey了幾個flash遊戲引擎, 後來挑了 PushButton Engine 研究.


The PushButton Engine is an Open Source, Flash game engine and framework that's designed for a new generation of games. PushButton Engine makes it easy to bring together great existing libraries and components for building Flash games. Spend less time on code, more time on building fun games.


PBE有加入Box2DFlashAS3的物理引擎支援,趁這週末花些時間研究一下如何應用
雖然實作上有遇到不少問題(我是挑svn latest版本研究, 跟r470版本差異部分蠻多的), 不過還是兜出了一個小作品"Avoid Ball":D
感覺PBE如果摸熟對遊戲開發上是個不錯的選擇.

- Avoid Ball:用左右鍵控制避免被球砸到(加上Box2DFlashAS3物理引擎)


- 2010/01/12 新增一個射擊遊戲範例:上下左右方向鍵控制 + 空白鍵射擊


(Read more...)