Monday, August 29, 2011

Adobe Flash CS5 Tutorial Pt. 1

This is going to be a tutorial on the basics on Adobe Flash CS5. In the end of all the tutorials, you should be able to make yourself a simple game. All Actionscript tutorials will be written in 2.0. So without further waiting, we shall go over the basics.


You must either download a trial of Adobe Flash CS5(Although any version supporting Actionscript 2.0 will suffice, the layout of the program may be different.) or buy it. It's quite expensive so I'd suggest the 1 month trial.

After installing the program, start it up, and you should come to a screen like this:


Select Actionscript 2.0 in the second column. You now will be at this screen:
The screen may look different if you are running a different version or setup.
We will get into what each part of the workspace does in a later part as it is unimportant at this moment. For now, let's get our hands dirty with some basic Actionscript.

Yes, we will begin with the basic "Hello, World!" example if you were curious. Press F9 on your keyboard to open up the Actionscript window. A rather large text box should open up. Inside, type this: trace("Hello, World!")

Let's explain the different parts of this basic code."trace" is used to send a message to the output box. Assuming your setup is like mine, the output box should be in the bottom left and middle(Although it may be replaced with a timeline, do not worry, it is there). The opening parentheses begins the message being sent to the output box. "Hello, World!" is just some text, you must have quotation marks around your text. You can also "Trace" variables, although you don't use quotation marks for variables. The closed parentheses ends the message. Fairly simple, no?


Now that the explanation is done, let's see it in action. Press Ctrl+Enter. A blank box appears! Lame, right? But check the bottom left corner, what does it say? Assuming it worked correctly, you have successfully written some basic Actionscript! Don't worry, in time, you will be coding like a pro. Or at least like you know what you are doing.



REVIEW: We learned how to open an Actionscript 2.0 file, and written some very basic code. We learned that tracing sends a message to the output box, and that message can also contain a variable, or even multiple variables if you wish.


Next lesson: We learn about variables and their purpose.


I hope you enjoyed this small tutorial. Let me know in the comments if you need any help on completing this tutorial. Feedback is also appreciated!

No comments:

Post a Comment