Accessibility
Adobe
Sign in My orders My Adobe

FlashPaper Documentation

FlashPaper API


Table of Contents

  1. FlashPaper API
  2. Functions supported in the FlashPaper 1.0 viewer
  3. Functions supported in the FlashPaper 1.01 viewer

Functions supported in the FlashPaper 1.01 viewer

FlashPaper 1.01 supports the functions supported by FlashPaper 1.0 and adds support for several other useful functions.

function getViewerType() Returns a string that describes the type of the viewer. The standard Macromedia-provided viewer always returns Macromedia FlashPaper Default Viewer.

function getViewerVersion() Returns an integer indicating the revision of this particular viewer type. FlashPaper 1.01 viewer returns the integer 2.

function getLoadedPages() Returns the number of pages loaded so far. This is always an integer between 0 and getNumberOfPages(), inclusive.

function showPrevNextUI( flag ) Hides or displays the Previous Page/Next Page user interface.

function showPrintUI( flag ) Hides or displays the Print user interface.

function printTheDocument() Opens the Print dialog box. This call behaves as if the user had clicked the Print button. Returns true if successful, false if not.

Note: The SWF file must be completely loaded for function printTheDocument() to succeed; if it returns false, that is generally because the document has not yet fully loaded.

function showZoomUI( flag ) Hides or displays all magnification-related user interface controls.

function setCurrentZoom(percent) Sets the current zoom to the given percentage. In addition to numeric values, you can pass width to fit the width into the view, and page to fit the page into the view.

function getCurrentZoom() Returns the current zoom level. Only numeric values are returned (never width or page). If the viewer doesn't support varying zoom levels, this function returns zero.

function onZoomChanged(percent) Called by the document when the zoom level changes. Default function does nothing. Can be overwritten by a container that wants to trap this event.

function setSize( w, h ) Sets the display size of the SWF file, in pixels. Returns true if resize was successful, false if not. This call should not be used unless the SWF file is embedded inside another SWF file.

Note: This call returns false until at least the first page of the document loads, so you may need to call it repeatedly until it returns true.