User Guide

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 =