2.5.09

FlashDevelop: Setting Up FlashDevelop for AS3 Programming

Setting Up FlashDevelop for AS3 Programming:
-Absolute beginner guide

Hopefully this should be a straightforward tutorial of how to get FlashDevelop up and running your ActionScript 3 material... this tutorial was written on FlashDevelop 3.0 and Adobe Flex SDK 3.3.

Files you need to grab:
  1. FlashDevelop at http://www.flashdevelop.org/community/viewforum.php?f=11 it's hosted in their forum I guess, not sure how long this link will be good.
  2. Adobe Flex SDK at http://www.adobe.com/products/flex/flexdownloads/ you can also get FlexBuilder from this site, I believe there is currently a month long trial before you have to buy. Lots of webpages say it is worth the money, but it's irrelevant to me because I will never have the money so I haven't tried it. Just grab the SDK if you are a cheap bastard like me.
  3. Windows Flash Player 9 or 10 Projector content debugger http://www.adobe.com/support/flashplayer/downloads.html this is optional, but you need some kind of Flash Player in order to run your movies, and this seems the best option to me because you have to deal with annoying security warnings etc if you use a Flash browser plugin to test. (The Projector is a standalone .exe).

It doesn't matter what order you do the installations in for the current FlashDevelop (3.0) because the installer doesn't ask for any sort of SDK path.

For SDK Install:

  1. Download the SDK http://www.adobe.com/products/flex/flexdownloads/
  2. Extract the SDK to a directory you will be able to find in the future. I went with "C:\AS3\flex_3.3.0.4852"
  3. Don't forget the location before you get FlashDevelop up and running.

For FlashDevelop Install:

  1. Download the latest FlashDevelop http://www.flashdevelop.org/community/viewforum.php?f=11
  2. Run the installer (standard windows procedure for installing)
  3. Run the program.

For Windows Flash Player 10 Projector content debugger install:

  1. Download the exe file from http://www.adobe.com/support/flashplayer/downloads.html
  2. Place the exe somewhere that you'll remember it. I stuck it in "C:\AS3\"

Set Up ActionScript 3 IDE:

  1. Run FlashDevelop
  2. First you need to set your compile path, so that the SDK can compile your scripts. To do this go to Tools > Program Settings...
  3. A window titled Settings should pop up. You want to select AS3Context in the list on the left.
  4. Now in the right list under the Language category, there should be a property called "Flex SDK Location" set default to something like "c:\flex_sdk_3". You need to change this to the path where you unzipped all that Adobe Flex SDK stuff. You can open a folder browse window to make it easier by clicking on the "..." button that appears when you select "Flex SDK Location"
  5. Time to check if everything is set up correctly.

Time to create an AS3 project and run it to see if everything is working:

  1. Click Project > New Project.
  2. Select AS3 Project in the Installed Templates List.
  3. Enter a Name for your Project
  4. This is a personal preference, but I always check "Create directory for project" because programming can quickly make a mess of your computer if you don't put atleast a little effort into organizing.
  5. If it isn't already selected, select the Project tab in the window on the right of your workspace.
  6. You should now see 3 folders: bin, lib, and src. bin will have some stuff in it to assist you in viewing/deploying your program that you don't really have to worry about right now. lib you can use later for your library files (if you use any). Currently we are concerned with the src folder. It should contain Main.as which you can double click to open in your editor window. There should be some basic framework code which I'll explain in the next tutorial, all you need to worry about now is checking if your setup works. Press F8 or click Project > Build Project To compile your empty project. The output should now flash a bunch of stuff and say "Build suceeded, Done (0)" at the end. If something else happens look at troubleshooting at the end of this blog.
  7. Now that your movie is built you can try to run it. You need to associate .swf files with the Flash Projector Debug program you downloaded earlier. In order to do this, expand your bin folder, and right click on a .swf file.
  8. Click Shell Menu... then Open With...
  9. Select the "Select a program from a list of installed programs" radio button and click OK.
  10. Click Browse... and find the Flash Projector exe file you downloaded.
  11. Check the "Always use the selected program to open this type of file box" and click OK.
  12. Now press F5 or click Project > Test Project to run your movie.
  13. The flash player you downloaded should now pop up and display a big white block. CONGRATULATIONS. Read on to the next tutorial to get yourself something a bit more impressive.

Troubleshoot:

Problem: When I try to build, a window pops up saying "Would you like to open the AS3 context settings to configure the compiler?"

Solution: You probably forgot to set the Flex SDK Location property, or left it default. Check steps 2-4 under "Set Up ActionScript 3 IDE".

Problem: When I press Test Program or hit F5 nothing happens.

Solution: Check your output, does it say something about Execute not being related to any program? This means you didn't set up your file association correctly. Check steps 7-11 in the list right above troubleshooting.

Explanation of the default AS3 project next >>

No comments:

Post a Comment