MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 526

Director scripting reference
Table of Contents

Advertisement

See also
Movie
setAlpha()
Usage
imageObject.setAlpha(alphaLevel)
imageObject.setAlpha(alphaImageObject)
Description
Function; sets the alpha channel of an image object to a flat alphaLevel or to an existing
alphaImageObject
image to appear more transparent. Higher values cause the image to appear more opaque. The
value 255 has the same effect as a value of zero. In order for the
of the image object must be set to
useAlpha()
The image object must be 32-bit. If you specify an alpha image object, it must be 8-bit. Both
images must have the same dimensions. If these conditions are not met,
and returns FALSE. The function returns TRUE when it is successful.
Example
The following Lingo statement makes the image of the bitmap cast member Foreground opaque
and disables the alpha channel altogether. This is a good method for removing the alpha layer
from an image:
member("Foreground").image.setAlpha(255)
member("Foreground").image.useAlpha = FALSE
This Lingo gets the alpha layer from the cast member Sunrise and places it into the alpha layer of
the cast member Sunset:
tempAlpha = member("Sunrise").image.extractAlpha()
member("Sunset").image.setAlpha(tempAlpha)
See also
useAlpha,
extractAlpha()
setaProp
Usage
setaProp list, listProperty, newValue
setaProp (childObject, listProperty, newValue)
list.listProperty = newValue
list[listProperty] = newValue
childObject.listProperty = newValue
Description
Command; replaces the value assigned to
The
command works with property lists and child objects. Using
setaProp
linear list produces a script error.
For property lists,
property isn't already in the list, Lingo adds the new property and value.
For child objects,
already in the object, Lingo adds the new property and value.
526
Chapter 12: Methods
. The
must be a number from 0–255. Lower values cause the
alphaLevel
replaces a property in the list specified by
setaProp
replaces a property of the child object. When the property isn't
setaProp
.
TRUE
with the value specified by
listProperty
to have effect, the
alphaLevel
has no effect
setAlpha()
newValue
setaProp
. When the
list
.
with a

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents