Print2Flash Document Application Programming Interface

Sometimes it is necessary to control Print2Flash documents not only by the
user pressing buttons on the toolbar
but also programmatically from an application which hosts the document, e.g.
from web
browser, another Flash movie or Flex application. Examples of such control could be zooming the document, jumping to
specified page, etc. This allows finer control over displayed content and
seamless integration of Print2Flash documents in other applications or websites.
This control can be easily achieved as Print2Flash documents
feature Application Programming Interface (API) which is exposed to hosting
applications. This interface is composed of a number of functions, each of
function performing a separate action. See
Reference for the full list of functions.
To access a Print2Flash document programmatically via Print2Flash Document
API you should clear "Disable Print2Flash Document API support" option when converting the
document. The Document API is supported only in Single
File and External Viewer output formats.
The following topics provide you with further information on using
Print2Flash Document API:
Choosing the right kind of document template
in Single File output format
Print2Flash has two kinds of standard built-in document templates for
Single File output format: a template using
ActionScript2 language and a template using ActionScript3. Usage techniques for
Print2Flash Document API differ between these kinds of templates. The
ActionScript2 template uses an older version of ActionScript, and we recommend
to use it only if you intend to embed Print2Flash documents into other Flash
movies which use ActionScript2 as well. In all other cases we recommend using a
template which uses a newer version of ActionScript: ActionScript3.
However, for backward compatibility we provide a method for embedding
ActionScript2 documents into other Flash movies using ActionScript3 created with
Adobe Flash CS Professional or Adobe Flex (Adobe Flash
Builder). This method is deprecated due to poor interoperability support
by the Flash Player between ActionScript2 and ActionScript3 movies. It is
preferable to use ActionScript2 documents only with movies compiled with
ActionScript2 support.
Note also that you cannot embed ActionScript3 documents into ActionScript2
Flash movies. You can control the ActionScript version using Document Template
field in the Output Tab of Document Options window.
Below is the table which will help you to quickly jump to a help topic
describing how you can embed Print2Flash documents into other Flash movies and
use Print2Flash Document API from them:
Note: * means a deprecated method as
described above.
|