User Guide
newCamera 419
The following statements create two child objects called myBird1 and myBird2. They are given
different starting speeds: 15 and 25, respectively. When the fly handler is called for each child
object, the speed of the object is displayed in the Message window.
myBird1 = script("Bird").new(15)
myBird2 = script("Bird").new(25)
myBird1.fly()
myBird2.fly()
This message appears in the Message window:
-- "I am flying at 15 mph"
-- "I am flying at 25 mph"
This statement creates a new timeout object called intervalTimer that will send a timeout event to
the
on minuteBeep handler in the child object playerOne every 60 seconds:
timeout("intervalTimer").new(60000, #minuteBeep, playerOne)
This statement creates a sample JavaScript function:
function sampleTimeout () { trace("hello"); }
Elsewhere in your movie you can use this statement to create a timeout object that calls the
JavaScript function:
-- Lingo syntax
gTO = timeout().new("test",50,"sampleTimeout",0)
// JavaScript syntax
_global.gTO = new timeout("test",50,"sampleTimeout",0)
See also
on stepFrame, actorList, ancestor, me, type (Member), timeout()
newCamera
Usage
member(whichCastmember).newCamera(newCameraName)
Description
3D command; creates a new camera within a cast member.
Parameters
newCameraName Required. Specifies the name of the new camera. The name of the new camera
must be unique within the cast member.
Example
This statement creates a new camera called in-car camera:
member("3D World").newCamera("in-car camera")