importFileInto()
365
When you create a new image object, the background color defaults to white
(color(255,255,255)), and the alpha channel is completely opaque (color(0,0,0)).
The alpha channel color for 100% transparency is white (color(255,255,255)); the alpha channel
color for 100% opaque is black (color(0,0,0)).
To see an example of
image()
used in a completed movie, see the Imaging movie in the Learning/
Lingo folder inside the Director application folder.
Parameters
intWidth
Required. An integer that specifies the width of the new image.
intHeight
Required. An integer that specifies the height of the new image.
intBitDepth
Required. An integer that specifies the bit depth of the new image. Valid values are
1, 2, 4, 8, 16, or 32.
Example
The following example creates an 8-bit image that is 200 pixels wide by 200 pixels high.
-- Lingo syntax
objImage = image(200, 200, 8)
// JavaScript syntax
var objImage = image(200, 200, 8);
The following example creates an image by referring to the image of the Stage.
-- Lingo syntax
objImage = _movie.stage.image
// JavaScript syntax
var objImage = _movie.stage.image;
See also
duplicate() (Image)
,
fill()
,
image (Image)
importFileInto()
Usage
-- Lingo syntax
memberObjRef
.importFileInto(
fileOrUrlString
)
// JavaScript syntax
memberObjRef
.importFileInto(
fileOrUrlString
);
Description
Member method; replaces the content of a specified cast member with a specified file.
The
importFileInto()
method is useful in the following situations.
•
When finishing or developing a movie, use it to embed external linked media so it can be
edited during the project.
•
When generating a Score from Lingo or JavaScript syntax during movie creation, use it to
assign content to new cast members.
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...