
new Operator
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
712
|
ActionScript Language Reference
new Operator
instantiate a new object
Flash 5
new constructor()
Operands
constructor A class constructor function used to initialize the new object.
Returns
A reference to the newly created object.
Description
The new operator creates an instance of the class specified by constructor. For complete
coverage of the role new plays in object-oriented programming, see Chapter 12.
See Also
Object.__proto__; “The new Operator” in Chapter 5; Chapter 12
newline Constant
insert a line break
Flash 4
newline
Returns
A newline character.
Description
The constant newline represents a standard line break character (ASCII 10). It is synony-
mous with the escape sequence “
\n” or the HTML tag <BR> and is used to force a line break
in a block of text (usually for display in a text field variable).
Example
myOutput = "hello" + newline + "world";
See Also
TextField.htmlText, TextField.text; “Escape sequences” in Chapter 4
nextFrame() Global Function
advance a movie or movie clip’s playhead one frame and stop it
Flash 2
nextFrame()
Description
The nextFrame() function moves the playhead of the current timeline ahead one frame and
stops it there. The current timeline is the timeline from which the nextFrame() function is
invoked. The nextFrame() function is synonymous with gotoAndStop(_currentFrame ...