Tuesday 10 December 2013

Installing FlashDevelop and Creating Very First Program

Flash develop is a great program to develop flash games with, its free, fun and relatively easy to use. In this tutorial I'll show you every thing you have to do to setup Flash develop and start creating your very own games in AS3.

1: Downloading FlashDevelop
First of all we need to download and install Flash develop and get it setup and running on your computer.
To do this go over to the FlashDevelop website and press the big green 'Download' button to the right side of the screen to download the latest version.

Yep that's the one ^

2: Installing FlashDevelop
Now that you've successfully downloaded the latest FlashDevelop installer and located the file (Probably in 'Downloads' folder). Click on it and just follow through the installer using the default installation options. Make sure you agree to install Flex SDK (needed for compiling) and ActiveX Debug Flash Player (needed for debugging).

Now if you've done this successfully you should have FlashDevelop ready to run on your computer. 

3:Testing FlashDevelop
Now that we've installed FlashDevelop all that's left to do is to write a simple 'Hello World' program to test it.  Click on the freshly installed FlashDevelop and once that's open press Project  New Project 

This should open a 'New Project' window, select AS3 Project from the list of installed template options. Now give your project a name and choose a destination for your project files. If you want a new folder to store all your project files tick 'create directory for project'. You can leave the 'Package' field empty. 

Choose these settings for you project, but use your own file location.

Now that you've chosen these settings press 'OK' and your project will now be constructed. 


On the side panel you'll notice a bunch of folders and files, click on the src folder and then open the Main.as file. This is the ActionScript file for the main class and is the first object to be created when you run the game so this is where you program all the starting code. In this test project we will be focusing solely on this class. 

Opening up this Actionscript file we see a number of default lines of codes that have already been written by the program:

This is mostly unnecessary code and can be shortened to: 


Now we will use our very first piece of written code. We are going to use the actionscript function called trace() which is used to send anything within the brackets to the debugger. We will tell our program to trace the string 'Hello World!' to the output console. To do that you write:

Notice the " between the words and the brackets. These are important as they tell the program that this is just a made up set of words, not an actual variable. 

Now to test your program hit Project  Test Project (or just push f5). Your project should open up and you should be able to see 'Hello World!' in the output box down the bottom of the screen.


Yay its working!

If you see this then yay! Its working. If this doesn't work leave a comment below and I'll try and get back to you as soon as I can. 

No comments:

Post a Comment

Advertisement: