Monday, May 12, 2008

Hello, World!

To demonstrate your new tools work correctly, create a Hello, World! Flash demo.
  1. Launch Eclipse.
  2. Close the Welcome screen with the small "x" icon.
  3. Window -> Open Perspective -> Other...
  4. Select ActionScript2
  5. Click OK
  6. File -> New -> New ActionScript Project
  7. Enter hello_world for the project name.
  8. Keep default location, project layout settings, and SWF version.
  9. Click Next
  10. Click Finish
  11. On the left you should see the Navigator. If not, Window -> Show View -> Navigator.
  12. Expand the hello_world project.
  13. Right click the src folder; select New -> ActionScript Class
  14. Enter Application in the Name box
  15. Enable checkbox public static main()
  16. Click Finish
  17. The Edit build element dialog will open. Leave everything alone, and click OK
  18. The Properties for hello_world dialog will open. Leave everything along (again), and click OK
  19. Double click on the source file Application.as to edit.
  20. Copy and paste this ActionScript source code.
  21. Enable from the menu: Project -> Build Automatically
    This option will rebuild the resulting SWF file after each save.
  22. File -> Save (Ctrl + S)
  23. In your project binary output folder (bin) you will find Application.swf
  24. Double click it to run.
  25. A tiny version (scaled down) of your Flash file will show "Hello, World!".
  26. In the bottom half of your output window should be a second set of tabbed windows. You may see Problems (compiler output), LuminicBox Log Viewer, and Tasks.
  27. If you do not see LuminicBox Log Viewer, activate the view. Window -> Show View -> Other... Then: ASDT -> LuminicBox Log Viewer
  28. There is debugging output from your Flash file. It should say: Application initialized: _level0
Congratulations! You have built your first Flash application.

1 comment:

chunkyguy said...

hi! i got stuck at step# 23 .. there's no "bin" folder! only "src" and i don't see at what step you compile the code!