![MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference Download Page 364](http://html1.mh-extra.com/html/macromedia/director-mx-2004-director-scripting/director-mx-2004-director-scripting_reference_3321720364.webp)
364
Chapter 12: Methods
Parameters
object
Required. Specifies the object to test.
type
Optional. Specifies the type to which
object
is compared. If the object is of the specified
type, the
ilk()
function returns
TRUE
. It the object is not of the specified type, the
ilk()
function returns
FALSE
.
Example
This statement shows that MyObject is a motion object:
put MyObject.ilk
-- #motion
The following statement tests whether MyObject is a motion object. The return value of 1 shows
that it is.
put MyObject.ilk(#motion)
-- 1
See also
tweenMode
image()
Usage
-- Lingo syntax
image(
intWidth
,
intHeight
,
intBitDepth
)
// JavaScript syntax
image(
intWidth
,
intHeight
,
intBitDepth
);
Description
Top level function; creates and returns a new image with specified dimensions.
If you create a new image by using the top level
image()
function, the new image is a self-
contained set of image data, and is independent of all other images. Therefore, changes made to
any other images have no effect on the new image.
If you refer to an image by setting a variable equal to a source image, such as a cast member or the
image of the Stage, the variable contains a reference to the source image. Therefore, a change
made to the image in either the source object or the variable will be reflected in the other image.
To avoid this behavior and create a copy of an image that is independent of the source image, use
the
duplicate()
method. The
duplicate()
method returns a copy of a source image that
inherits all the values of the source image but is not tied to the source image. Therefore, a change
made to either the source image or the new copy of the source image will have no effect on the
other image.
If you create an image object by referring to a cast member, the new object contains a reference to
the image of the member. Any changes made to the image are reflected in the cast member and in
any sprites that are created from that member.
vector
#vector
#vector
transform
#transform
#transform
Type of object
ilk(object) returns
ilk(object, Type) if only Type =
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...