728
Chapter 14: Properties
-- Lingo syntax
on setDefaultRectSize(whichCast)
repeat with i = 1 to castLib(whichCast).member.count
if member(i, whichCast).type = #flash then
member(i, whichCast).defaultRectMode = #fixed
member(i, whichCast).defaultRect = rect(0,0,320,240)
end if
end repeat
end
// JavaScript syntax
function setDefaultRectSize(whichCast) {
var i = 1;
while( i < (castLib(whichCast).member.count) + 1)
var tp = member(i, whichCast).type;
if (tp = "flash") {
member(i, whichCast).defaultRectMode = symbol("fixed");
member(i, whichCast).defaultRect = rect(0,0,320,240);
i++;
}
}
}
See also
flashRect
,
defaultRect
density
Usage
member(
whichCastmember
).shader(
whichShader
).density
member(
whichCastmember
).model(
whichModel
).shader.density
member
(whichCastmember).
model
(whichModel).
shaderList{[
index
]}
.
\
density
Description
3D
#engraver
and
#newsprint
shader property; adjusts the number of lines or dots used to
create the effects of these specialized shader types. Higher values result in more lines or dots.
For
#engraver
shaders, this property adjusts the number of lines used to create the image. The
range is 0 to 100 and the default value is 40.
For
#newsprint
shaders, this property adjusts the number of dots used to create the image. The
value can be from 0 to 100 and the default value is 45.
Example
The following statement sets the
density
property of the shader named EngShader to 10. The
lines used by this
#engraver
shader to create its stylized image will be coarse and far apart.
member("scene").shader("EngShader").density = 10
The following statement sets the
density
property of the shader gbShader to 100. The dots used
by this
#newsprint
shader to create its stylized image will be very fine and close together.
member("scene").shader("gbShader").density = 100
See also
newShader
Summary of Contents for DIRECTOR MX 2004
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...