User Guide

306
Examples
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
Syntax
whichMember.image
(the stage).image
window(windowName).image
Description
This property refers to the image object of a bitmap or text cast member, of the Stage, or of a window.
You can get or set a cast member’s image, but you can only get the image of the Stage or a window.
Setting a cast members image property immediately changes the contents of the member.
However, when you get the image of a member or window, Director creates a reference to the
image of the specified member or window. If you make changes to the image, the contents of the
cast member or window change immediately.
If you plan to make a lot of changes to an items image property, it is faster to copy the items
image property into a new image object using the
duplicate() function, apply your changes to
the new image object, and then set the original items image to the new image object. For non-
bitmap members, it is always faster to use the
duplicate() function.
Examples
This statement puts the image of cast member originalFlower into cast member newFlower:
member("newFlower").image = member("originalFlower").image
These statements place a reference to the image of the stage into the variable myImage and then
put that image into cast member flower:
myImage=(the stage).image
member("flower").image = myImage
See also
setPixel(), draw(), image(), fill(), duplicate() (image function),
copyPixels()