ActionScript for Flash MX: The Definitive Guide, Second Edition

ActionScript for Flash MX: The Definitive Guide, 2nd EditionBy Colin Moock
Chapter 18.  ActionScript Language Reference
printAsBitmapNum( ) Global Function Flash 5

print the frames of a document level as bitmaps

printAsBitmapNum(level, boundingBox)

Arguments

level

A nonnegative integer or an expression that yields a nonnegative integer, indicating the document level to print.

boundingBox

A string either "bframe", "bmax", or "bmovie" indicating how the printed frames of target should be cropped or scaled when printed, as described earlier under print( ).

Description

The printAsBitmapNum( ) function is nearly identical to printAsBitmap( ), except that it requires the target level of the print operation to be specified as a number rather than as a string. This means that printAsBitmapNum( ) can print document levels only, not movie clips. It normally is used to dynamically assign the level of a movie to print, as in:

var x = 3; printAsBitmapNum(x, "bmax");

which can also be achieved using string concatenation with the regular printAsBitmap( ) function:

printAsBitmap("_level" + x, "bmax");

Usage

See Usage notes under the print( ) function.

See Also

print( ), printAsBitmap( ), printNum( )

    Категории