Lingo Dictionary > O-R > rawNew() |  |

rawNew()

Syntax

    parentScript.rawNew()
    rawNew(parentScript)

Description

Function; creates a child object from a parent script without calling its `on new` handler. This allows a movie to create child objects without initializing the properties of those child objects. This is particularly useful when you want to create large numbers of child objects for later use. To initialize the properties of one of these raw child objects, call its `on new` handler.

Example

This statement creates a child object called RedCar from the parent script CarParentScript without initializing its properties:

    RedCar = script("CarParentScript").rawNew()

Example

This statement initializes the properties of the child object RedCar:

    RedCar.new()

`new(), script`