
320
Chapter 15: The 3D Cast Member, 3D Text, and 3D Behaviors
Textures
Textures are 2D images that are drawn on the surface of a 3D model. Textures can be assigned to
models in your 3D modeling software, or you can use any bitmap cast member in your movie.
You can also use any image object created using Lingo or JavaScript.
The following cast member methods and properties can be used to perform basic
texture operations:
deleteShader
(
name
)
Deletes the shader named
name
. Script
references to this shader persist but can
do nothing.
TRUE (1)
if the shader named
name
exists.
FALSE (0)
if the
shader named
name
doesn’t
exist.
deleteShader
(
index
)
Deletes the shader with the given index
number. Script references to this shader
persist but can do nothing.
TRUE (1)
if the shader with this
index number exists.
FALSE
(0)
if the shader with this index
number doesn’t exist.
Method
Function
Returns
texture.count
Returns the number of textures in the texture
object list of the cast member.
Integer.
texture(
name
)
Returns the texture object named
name
.
Returns the texture object
named
name
if it exists. Returns
void
if the object does not
exist.
texture[
index
]
Returns the texture at the designated
position in the index.
The index number can
change if textures are added or deleted.
Returns the texture object at
that index number if it exists.
Returns
void
if the object does
not exist at that index number.
newTexture
(
name, type,
source
)
Creates a new texture named
name
.
The
type
can have the following values:
#fromCastmember
#fromImageObject
If
type
is
#from Castmember
,
source
is a cast
member reference. For example,
member(
"
concrete
"
) or member[2,3]
If
type
is
#from ImageObject
,
source
is a
script image object.
Returns a new texture object
with a unique name. If the
name isn’t unique, returns a
script error.
deleteTexture
(
name
)
Deletes the texture named
name
. Script
references to this texture persist but can
do nothing.
TRUE (1)
if the texture named
name
exists.
FALSE (0)
if the
texture named
name
doesn’t
exist.
deleteTexture
(
index
)
Deletes the texture with the given index
number. Script references to this texture
persist but can do nothing.
TRUE (1)
if the texture with this
index number exists.
FALSE
(0)
if the texture with this
index number doesn’t exist.
Method
Function
Returns
Содержание DIRECTOR MX 2004-USING DIRECTOR
Страница 1: ...DIRECTOR MX 2004 Using Director...
Страница 16: ...16 Chapter 1 Introduction...
Страница 82: ...82 Chapter 3 Sprites...
Страница 98: ...98 Chapter 4 Animation...
Страница 134: ...134 Chapter 5 Bitmaps...
Страница 242: ...242 Chapter 10 Sound and Synchronization...
Страница 274: ...274 Chapter 11 Using Digital Video...
Страница 290: ...290 Chapter 12 Behaviors...
Страница 302: ...302 Chapter 13 Navigation and User Interaction...
Страница 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Страница 392: ...392 Chapter 16 Working with Models and Model Resources...
Страница 418: ...418 Chapter 18 Movies in a Window...
Страница 446: ...446 Chapter 22 Managing and Testing Director Projects...