Creating a new projectNow we need to setup a new project for this lesson. Right click in
the Flex navigator window and click New->ActionScript Project. ![]() Let's give the project a name by typing Lesson1FlexBuilder in the project name text box and click next. ![]() We now have a question to ask ourselves. "Will we be using the
PushButton Engine as is or do we plan on making modifications to the
source?" SourceTo setup the source path click the source path tab and then add folder. ![]() When using the PushButton Engine source we need to add some additional compiler arguments for embeding data. ![]() LibraryTo setup the library path click the library path tab and then add swc. ![]() Hello, World!That's right, it's time for some code! ![]() Copy the code below and paste it into Lesson1FlexBuilder.as. 01. package 02. { 03. // Flash Imports 04. import flash.display.Sprite; 05. 06. // PushButton Engine Imports 07. import com.pblabs.engine.PBE; 08. import com.pblabs.engine.debug.Logger; 09. 10. public class Lesson1FlexBuilder extends Sprite 11. { 12. public function Lesson1FlexBuilder() 13. { 14. PBE.startup(this); 15. Logger.print(this, "Hello, World!"); 16. } 17. } 18. } Save the file and click Project->Build Project in the menubar. ![]() To view our master piece click Run->Debug in the menubar. ![]() ReviewTo summarize the steps of using the PushButton Engine with the Adobe Flex Builder IDE.
ConclusionCongratulations! You just completed lesson #1, creating a project and linking to the PushButton Engine. |