User Guide
createMask() 275
Example
This statement displays the number 3, the number of entries:
--Lingo syntax
put([10,20,30].count) -- 3
// JavaScript syntax
put(list(10,20,30).count); // 3
See also
globals
createFile()
Usage
-- Lingo syntax
fileioObjRef.createFile(stringFileName)
// JavaScript syntax
fileioObjRef.createFile(stringFileName);
Description
Fileio method; Creates a specified file.
Parameters
stringFileName
Required. A string that specifies the path and name of the file to create.
See also
Fileio
createMask()
Usage
imageObject.createMask()
Description
This function creates and returns a mask object for use with the copyPixels() function.
Mask objects aren’t image objects; they’re useful only with the
copyPixels() function for
duplicating the effect of mask sprite ink. To save time, if you plan to use the same image as a mask
more than once, it’s best to create the mask object and save it in a variable for reuse.
Example
This statement copies the entire image of member Happy into a rectangle within the image of
member brown square. Member gradient2 is used as a mask with the copied image. The mask is
offset by 10 pixels up and to the left of the rectangle into which the image of member Happy
is pasted.
member("brown square").image.copyPixels(member("Happy").image, \
rect(20, 20, 150, 108), member("Happy").rect, \
[#maskImage:member("gradient2").image.createMask(), maskOffset:point(-10, -
10)])
See also3
copyPixels(), createMatte(), ink