View comments | RSS feed

printFrom()

Usage

-- Lingo syntax
_movie.printFrom(startFrameNameOrNum {, endFrameNameOrNum, redux})

// JavaScript syntax
_movie.printFrom(startFrameNameOrNum {, endFrameNameOrNum, redux});

Description

Movie method; prints whatever is displayed on the Stage in each frame, whether or not the frame is selected, starting at the frame specified by startFrame. Optionally, you can supply endFrame and a reduction (redux) value (100%, 50%, or 25%).

The frame being printed need not be currently displayed. This command always prints at 72 dots per inch (dpi), bitmaps everything on the screen (text will not be as smooth in some cases), prints in portrait (vertical) orientation, and ignores Page Setup settings. For more flexibility when printing from within Director, see PrintOMatic Lite Xtra, which is on the installation disk.

Parameters

startFrameNameOrNum Required. A string or integer that specifies the name or number of the first frame to print.

endFrameNameOrNum Optional. A string or integer that specifies the name or number of the last frame to print.

redux Optional. An integer that specifies the reduction value. Valid values are 100, 50, or 25.

Example

This statement prints what is on the Stage in frame 1:

-- Lingo syntax
_movie.printFrom(1)

// JavaScript syntax
_movie.printFrom(1);

The following statement prints what is on the Stage in every frame from frame 10 to frame 25. The reduction is 50%.

-- Lingo syntax
_movie.printFrom(10, 25, 50)

// JavaScript syntax
_movie.printFrom(10, 25, 50);

See also

Movie


Comments


Charles Parcell said on Feb 18, 2005 at 2:06 PM :
This really needs to be part of the documentation for this command.

Yes, this command prints *any* frame of your movie, but it does so by moving the playback head to that frame.

To make things a little more difficult, best results can be obtained by capturing the stage image and then printing that in some form. So, for example...

I want to print the current frame. I would also setup another frame that has a single sprite which is a bitmap the same size as the stage. In this example I will be on frame 5 and my "print frame" will be frame 10. The sprite in frame 10 references member("snapShot"). The movie is set to 600x800.

on mouseUp(me) -- This is on your print button
snapRect = (0,0,800,600)
member("snapShot").image.copyPixels(_movie.stage.image, snapRect, snapRect)
printFrom(10)
end

Now, how you get back to the frame you should be on is up to you. In my projects I typically set up my print frame in the frame just before the frame I am in. This way the playback head will naturally move back to the frame I want it to be in.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/director/mx2004/release_update_en/07_me321.htm