Print2Flash Document API Sample for ActionScript2 documents for
Flash movies using ActionScript2
Sample function:
This sample demonstrates how a Print2Flash document using
Flash and ActionScript2 can be embedded into another Flash movie which uses
ActionScript2 and programmatically manipulated with Print2Flash
Document API.
Installation instructions:
Just unpack the sample folder to disk.
Usage instructions:
The sample contains the following files:
- docapisample.fla - sample source code;
- docapisample.swf - compiled sample Flash movie;
- docapisample.html - HTML page used for launching the sample;
- sample.swf - Print2Flash document that is used in the sample
obtained by conversion of a document to Flash using Print2Flash.
To launch the sample:
- Open the docapisample.html HTML page by double clicking it in
Windows Explorer.
- You should see a sample Flash movie with a Flash document
embedded in it You can manipulate the document either from its
native gray toolbar or using buttons located above the movie. These
buttons are contained in the sample movie and the button clicks are
communicated to the embedded Print2Flash document via Print2Flash
Document API.
Also, below the Print2Flash document you should see a current page
number indicator which is updated if you scroll the document. These
updates are performed with Print2Flash Document API events.
To see the source code you need to open docapisample.fla file in
Flash Professional and analyze it. Of course, you can load your own
Print2Flash documents using this sample. Note that to load a
document in Flash and access it via Print2Flash Document API you
should clear "Disable Print2Flash Document API support" option in
the Protection tab of Document Options window when converting the
document. Also, you must generate ActionScript2 documents in order
to be able to use them with this sample. This is controlled with
Flash Document Format field in the Flash Output Tab of Document Options
window.