Using Director > Vector Shapes and Bitmaps > Controlling bitmap images with Lingo

 

Controlling bitmap images with Lingo

Lingo lets you control bitmap images in two different ways. First, you can perform simple operations that affect the content of entire image cast members. These include changing the background and foreground colors, and switching the image that appears in a specific cast member with that of another cast member. Each of these operations manipulates a property of the entire image cast member.

Second, you can use Lingo to perform fine manipulations of the pixels of an image or to create entirely new images. This allows you to be extremely flexible about which images you display. You can create images based on dynamic information, such as user input, or based on any other factors you wish to include. To perform this kind of image operation, Lingo works with image objects. See Creating image objects.

To change the image assigned to a bitmap cast member:

Set the picture cast member property. See picture (cast member property).

To specify the background or foreground of a bitmap sprite:

Set the backColor or foreColor sprite property. See backColor and foreColor.

To capture the current graphic contents of the Stage:

Set a bitmap's picture cast member property to the Stage's picture property. See picture (cast member property).

For example, the statement member("Archive").picture = (the stage).picture makes the current image of the Stage the image for the bitmap cast member Archive.