|
Written by Rawpulse
|
|
Friday, 20 October 2006 |
|
Learn the basics of ActionScript Syntax!
ActionScript can be a difficult segment of Flash to master, especially if you’re not very good with computer languages. Most Flash projects, including cartoons, applications and especially games, will require ActionScript.
Flash is an Object-Oriented Programming (OOP) language that gives you control over how your project plays. The following examples show the basic syntax (or rules) that the ActionScript must follow.
- The semicolon (;) is always used at the end of a statement, just as a period is used in a regular sentence.
gotoAndPlay("movie");
- Parentheses () are used to group specific arguments that apply to the following statement.
on(release)
- Curly braces {} group all related statements in ActionScript. You can also nest these braces.
on(release){ gotoAndPlay("movie"); }
- A period (.) is used to links parts of the script.
this .onEnterFrame = function (){ However there are more that you will discover as you progress with Flash and ActionScript, but the ones listed above are the ones you will encounter when you first begin writing your code. For more information on ActionScript, watch the ActionScript Basics video tutorial. If you had a problem with this tutorial, tell us about it on the KnowFlash forum.
|
|
Last Updated ( Friday, 20 October 2006 )
|