
362
Chapter 16: Working with Models and Model Resources
Texture methods
The pixel height and width of the 2D images you use as textures should be powers of 2 (that is,
2, 4, 8, 16, 32, and so on). If not, the image will be resized to a dimension that is a power of 2.
The
scaleDown()
method lets you retain manual control over this procedure at the texture level.
compressed
Get and set
The property can be
TRUE (1)
or
FALSE
(0)
:
TRUE (1)
: the texture is compressed
FALSE (0)
: the texture is not
compressed
The value changes automatically from
TRUE (1)
to
FALSE (0)
when the texture
is to be rendered.
The value can be set to
FALSE (0)
to
decompress or to
TRUE (1)
to remove
the decompressed representation from
memory.
TRUE (1)
renderFormat
Get and set
This property determines how many bits
are used to render the texture. It takes
the following values:
#default
: the texure is rendered based
on the value of the
getRendererServices().textureRender
Format
property.
#rgbaWXYZ
: renders the texture using W
bits for the red channel, X bits for the
green channel, Y bits for the blue
channel and Z bits for the alpha channel.
This is available using the following
possible combinations:
#rgba8888
#rgba8880
#rgba5650
#rgba5550
#rgba5551
#rgba4444
#default
Method
Description
Returns
scaleDown()
Reduces the height of the texture to the next lowest
power of 2. This is useful for dynamically resizing
textures to fit on a client machine.
Nothing
Property
Access
Description
Default
Содержание 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...