Table of error messages

The following table contains a list of error messages returned by the Flash compiler. An explanation of each message is provided to aid you in troubleshooting your movie files.

Error message

Description

Property <property> does not exist

A property that does not exist was encountered. For example, x = _green is invalid, because there is no _green property.

Operator <operator> must be followed by an operand

An operator without an operand was encountered. For example, x = 1 + requires an operand after the + operator.

Syntax error

This message is issued whenever a nonspecific syntax error is encountered.

Expected a field name after '.' operator

You must specify a valid field name when using the object.field syntax.

<token> Expected

An invalid or unexpected token was encountered. For example, in the syntax below, the token foo is not valid. The expected token is while.

do {

trace (i)

} foo (i < 100)

Initializer list must be terminated by <terminator>

An object or array initializer list is missing the closing ] or }.

Identifier expected

An unexpected token was encountered in place of an identifier. In the example below, 3 is not a valid identifier.

var 3 = 4;

The JavaScript '<construct>' construct is not supported

A JavaScript construct that is not supported by ActionScript was encountered. This message appears if any of the following JavaScript constructs are used: void, try, catch, or throw.

Left side of assignment operator must be variable or property

An assignment operator was used, but the left side of the assignment was not a legal variable or property.

Statement block must be terminated by '}'

A group of statements was declared within curly braces, but the closing brace is missing.

Event expected

An on(MouseEvent) handler was declared, but no event was specified, or an unexpected token was encountered where an event should appear.

Invalid mouse event specified

The script contains an invalid mouse event in a handler. For a list of valid mouse events, see the On(MouseEvent) entry in the online ActionScript Dictionary.

Key code identifier expected

You need to specify a key code. See Appendix B for a list of key codes.

Invalid key code

The specified key code does not exist.

Trailing garbage found

The script or expression parsed correctly but contained additional trailing characters that could not be parsed.

Function name expected

The name specified for this function is not a valid function name.

Parameter name expected

A parameter (argument) name was expected in a function declaration, but an unexpected token was encountered.

'else' encountered without matching 'if'

An else statement was encountered, but no if statement appeared before it. You can use else only in conjunction with an if statement.

Scene name must be a quoted string

The scene argument of a gotoAndPlay, gotoAndStop, or ifFrameLoaded action was of the wrong type. The scene argument must be a string constant.

Internal error

An internal error occurred in the ActionScript compiler. Please send the FLA file that generated this error to Macromedia, with detailed instructions on how to reproduce the message.

Hexadecimal digits expected after 0x

The sequence 0x was encountered, but the sequence was not followed by valid hexadecimal digits.

Error opening include file:file not found

There was an error opening a file included with the include directive. The file was not present.

Malformed #include directive

An include directive was not written correctly. An include directive must use the following syntax:

#include "somefile.as"

Multi-line comment was not terminated

A multi-line comment started with /* is missing the closing */ tag.

String literal was not properly terminated

A string literal started with an opening quotation mark (single or double) is missing the closing quotation mark.

Wrong number of parameters; <function> requires between <low> and <high>

A function was called, but an unexpected number of parameters were encountered.

Property name expected in getProperty

The getProperty function was called, but the second parameter was not the name of a movie clip property.

Parameter <parameter> cannot be declared multiple times

A parameter name appeared multiple times in the parameter list of a function declaration. All parameter names must be unique.

Variable <variable> cannot be declared multiple times

A variable name appeared multiple times in a var statement. All variable names in a single var statement must be unique.

'on' handlers may not nest within other 'on' handlers

An on handler was declared inside another on handler. All on handlers must appear at the top level of an action list.

'onClipEvent' handlers may not nest within other 'onClipEvent' handlers

An onClipEvent handler was declared inside another onClipEvent handler. All onClipEvent handlers must appear at the top level of an action list.

Statement must appear within on handler

(Message appears for Flash 5 format)

In the actions for a button instance, a statement was declared without a surrounding on block. All actions for a button instance must appear inside an on block.

Statement must appear within onClipEvent handler (Message appears for Flash 5 format)

In the actions for a movie clip instance, a statement was declared without a surrounding onClipEvent block. All actions for a movie clip instance must appear inside an onClipEvent block.

Statement must appear within on or onClipEvent handler

(Message appears for Flash MX format)

In the actions for a movie clip instance, a statement was declared without a surrounding on or onClipEvent block. All actions for a movie clip instance must appear inside an on or onClipEvent block.

Mouse events are permitted only for button instances (Message appears for Flash 5 format)

A button event handler was declared in a frame action list or a movie clip instance's action list. Button events are permitted only in the action lists of button instances.

Clip events are permitted only for movie clip instances

A clip event handler was declared in a frame action list or a button instance's action list. Clip events are permitted only in the action lists of movie clip instances.

Function declaration not permitted here

Cannot use a named function when declaring it in an assignment.

Duplicate in event list

An on handler was specified with a duplicate event.

Invalid movie clip event specified

An onClipEvent handler can only accept load, enterForm, unload, mouseMove, mouseDown, mouseUp, keyDown, keyUp, or data events.

Case-insensitive identifier <identifier> will obscure built-in object <object name>

Since ActionScript is case-insensitive, a case-insensitive identifier would obscure a built-in object.

Case statements can only be used inside a switch statement

Case statements must be used inside of switch statements.

Case statements must be terminated with a ':'

Every case statement within a switch statement must end with a colon.