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 =
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...