The IllegalOperationError exception is thrown when a method is not implemented or the implementation doesn't cover the current usage.

Examples of illegal operation error exceptions include:

  • A base class, such as DisplayObjectContainer, provides more functionality than a Stage can support(such as masks)
  • Certain accessibility methods are called when the player is compiled without accessibility support
  • The mms.cfg setting prohibits a FileReference action
  • ActionScript tries to run a FileReference.browse() call when a browse dialog box is already open
  • ActionScript tries to use an unsupported protocol for a FileReference object(such as FTP)
  • Authoring-only features are invoked from a run-time player
  • An attempt is made to set the name of a Timeline-placed object


@:value({ message : "" })new(message:String = "")

Creates a new IllegalOperationError object.



A string associated with the error object.

Inherited Variables

Defined by Error

read onlyerrorID:Int

Contains the reference number associated with the specific error message. For a custom Error object, this number is the value from the id parameter supplied in the constructor.


Contains the message associated with the Error object. By default, the value of this property is "Error". You can specify a message property when you create an Error object by passing the error string to the Error constructor function.

Inherited Methods

Defined by Error


Returns the call stack for an error at the time of the error's construction as a string. As shown in the following example, the first line of the return value is the string representation of the exception object, followed by the stack trace elements:

TypeError: Error #1009: Cannot access a property or method of a null object reference

The preceding listing shows the value of this method when called in a debugger version of Flash Player or code running in the AIR Debug Launcher (ADL). When code runs in a release version of Flash Player or AIR, the stack trace is provided without the file path and line number information, as in the following example:

TypeError: Error #1009: Cannot access a property or method of a null object reference

For Flash Player 11.4 and earlier and AIR 3.4 and earlier, stack traces are only available when code is running in the debugger version of Flash Player or the AIR Debug Launcher (ADL). In non-debugger versions of those runtimes, calling this method returns null.


A string representation of the call stack.


Returns the string "Error" by default or the value contained in the Error.message property, if defined.


The error message.