-- Lingo syntaximageObjRef.image // JavaScript syntaximageObjRef.image;
Image property. Refers to the image object of a bitmap or text cast member, of the Stage, or of a window. Read/write for a cast member's image, read-only for an image of the Stage or a window.
Setting a cast member's image property immediately changes the contents of the member. However, when getting 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 windows, the contents of the cast member or window change immediately.
If you plan to make a lot of changes to an item's image property, it is faster to copy the item's image property into a new image object using the duplicate() method, apply your changes to the new image object, and then set the original item's image to the new image object. For nonbitmap members, it is always faster to use the duplicate() method.
This statement puts the image of cast member originalFlower into cast member newFlower:
-- Lingo syntax
member("newFlower").image = member("originalFlower").image
// JavaScript syntax
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:
-- Lingo syntax
myImage = _movie.stage.image
member("flower").image = myImage
// JavaScript syntax
var myImage = _movie.stage.image;
member("flower").image = myImage;
copyPixels(), draw(), duplicate() (Image), fill(), image(), setPixel()