MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 17

Actionscript language reference
Table of Contents

Advertisement

Comments can be any length without affecting the size of the exported file, and they do not need
to follow rules for ActionScript syntax or keywords.
To create a comment block, place
This technique lets you create lengthy comments without adding // at the beginning of each line.
By placing large chunks of script in a comment block, called commenting out a portion of your
script, you can test specific parts of a script. For example, when the following script runs, none of
the code in the comment block is executed:
// The following code runs
var x:Number = 15;
var y:Number = 20;
// The following code doesn't run
/*
// create new Date object
var myDate:Date = new Date();
var currentMonth:Number = myDate.getMonth();
// convert month number to month name
var monthName:String = calcMonth(currentMonth);
var year:Number = myDate.getFullYear();
var currentDate:Number = myDate.getDate();}
*/
// The code below runs
var name:String = "My name is";
var age:Number = 20;
Keywords and reserved words
ActionScript reserves words for specific use within the language, so you can't use them
as identifiers, such as variable, function, or label names. The following table lists all
ActionScript keywords:
break
default
extends
if
instanceof
private
static
var
at the beginning of the commented lines and
/*
case
delete
for
implements
interface
public
switch
void
class
dynamic
function
import
intrinsic
return
this
while
at the end.
*/
continue
else
get
in
new
set
typeof
with
Syntax
17

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents