BUILDING A SIMPLE GAME WITH FLASH PRO
Adobe MAX 2013 Lab by Tom Krcha (Sr. Creative Cloud Evangelist at Adobe) Follow me on Twitter: @tomkrcha
Adobe
MAX
2013
Lab
by
Tom
Krcha
(Sr.
Creative
Cloud
Evangelist
at
Adobe)
Follow
me
on
Twitter:
@tomkrcha
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
BEGINNER’S TUTORIAL<br />
You are going to learn Citrus Engine (http://citrusengine.com) basics. Citrus Engine<br />
is lightweight GPU accelerated game engine for Flash and AIR and includes<br />
platformer kit for side-‐scroller platform games. It runs on top of Starling Framework<br />
(2D) and Away3D framework (3D) and you can choose one of the physics engines<br />
that are included as well – Box2D, NAPE, AwayPhysics. For our game we are going to<br />
use Starling + Box2D combination.<br />
Setup the most basic scene with Citrus Engine.<br />
Start Flash Builder 4.7 and later we are going to use Flash Pro for level design and<br />
animations , but project management and coding will be done in Flash Builder as it’s<br />
more suitable for it. Design = Flash Pro, Programming = Flash Builder.<br />
Create a new project in Flash Builder<br />
File -‐> New -‐> ActionScript Project<br />
(name the project MAXBeginner or similar)<br />
Link Citrus library<br />
Right click on the project -‐> Properties -‐> ActionScript Build Path -‐> Add SWC<br />
(locate CitrusEngine’s SWC file) -‐> OK<br />
In the main class add following code:<br />
package<br />
{<br />
import citrus.core.starling.StarlingCitrusEngine;<br />
}<br />
[SWF(frameRate="60", width="1024", height="768")]<br />
public class MAXBeginner extends StarlingCitrusEngine<br />
{<br />
public function MAXBeginner()<br />
{<br />
setUpStarling(true);<br />
}<br />
}<br />
state = new GameState();<br />
Building a simple game with Flash Professional. MAX 2013 Lab by Tom Krcha (@tomkrcha) 3