Flex 2 - ActionScript 3 Klondike by Darron Schall
ActionScript 3 Klondike is an ActionScript 3-only implementation of the classic Klondike Solitaire game. This is a great example to use as a starting point for other card games going forward. There is a generic card engine that is completely skinnable and can easily be extended to create other games (such as FreeCell, Poker, etc).
Purchase Klondike for $50 US.
The game features a modular Object-Oriented architecture, so the core card engine can easily be dropped into a game and function without issue. Creating FreeCell from this example is just a matter of changing the game rules since everything else can be re-used. This is also a good example of using the new DisplayList API. Whenever you drag some cards around, there is no need to worry about depth management or attaching and removing MovieClips to achieve the effect (things we had to worry about with ActionScript 2). Instead, just re-parent the cards and magically they are on top of everything. When the cards are dropped, re-parent the cards again, and magically they are attached elsewhere. There are still some things not done - for instance, there is no scoring, and there is no super-cool end game animation sequence (or even a message that tells you you win). However, the game is fully playable, and a great starting point for your own card game or just a great learning example for Object Oriented Programming and the new features of ActionScript 3.
Open Example SWF in a New Window
Purchase Klondike for $50 US.
This example is available with full source and documentation within Flex® by Example.
More to come.
Ted :)


0 Comments:
Post a Comment
<< Home