944
Chapter 14: Properties
The command creates a Shock Font in
whichCastMember
using the font named in the
font
argument. The value returned from the command reports whether the operation was successful.
Zero indicates success.
Example
This statement creates a simple Shock Font using only the two arguments for the cast member
and the font to record:
myNewFontMember = new(#font)
recordFont(myNewFontMember, "Lunar Lander")
This statement specifies the bitmap sizes to be generated and the characters for which the font
data should be created:
myNewFontMember = new(#font)
recordfont(mynewmember,"lunar lander", [], [14, 18, 45], "Lunar Lander Game
High \ Score First Last Name")
Note:
Since
recordFont
resynthesizes the font data rather than using it directly, there are no legal
restrictions on Shock Font distribution.
See also
new()
rect (camera)
Usage
sprite(
whichSprite
).camera(
whichCamera
).rect
Description
3D camera property; allows you to get or set the rectangle that controls the size and position
of the camera. This rectangle is analogous to the rectangle you see through the eyepiece of a
real camera.
The default value for the rect property for all cameras rect(0,0,1,1) which makes them invisible
until you change the setting. However, when
sprite.camera(1)
is rendered, its rect is reset to
rect(0, 0, sprite(
whichSprite
).width, sprite(
whichSprite
).height)
so that the
camera fills the screen. All camera rect coordinates are given relative to the top left corner of
the sprite.
If
whichCamera
is greater than 1, the
rect
is not scaled when the sprite is scaled, so it will be
necessary to manage that with script if desired.
When
whichCamera
is greater than 1, the
rect.top
and
rect.left
properties must be greater
than or equal to the
rect.top
and
rect.left
settings for
sprite.camera(1)
.
Example
This statement sets the rect of the default camera of sprite 5 to rect(0, 0, 200, 550):
sprite(5).camera.rect = rect(0, 0, 200, 550)
See also
cameraPosition
,
cameraRotation
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...