Sample for accessing Print2Flash Document API from an HTML page for Flash Documents


Sample function:

This sample demonstrates how a Print2Flash document can be embedded into a web page and programmatically manipulated using Print2Flash Document API. The method demonstrated by this sample applies to both ActionScript2 and ActionScript3 documents.

Installation instructions:

  1. Unpack the sample folder to disk.
  2. Upload the sample files to a web site.

Usage instructions:

To launch the sample, just launch a web browser and open the sample.htm page from the web site. You should see a sample web page 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 web page and the button clicks are communicated to the embedded Print2Flash document  via Print2Flash Document API.

Note that default Flash Player security settings do not allow viewing this sample from disk. That's why you need to upload the sample files to a web site. However, it is possible to launch it from disk if you loosen Flash Player security restrictions by adding the folder to which you unpacked the files to the list of trusted locations (refer to Flash Player documentation for details).

Also, above 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 sample.htm file in a text editor. Of course, you can load your own Print2Flash documents using this sample. Note that to access Print2Flash documents 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.


Copyright (C) Print2Flash Software. All rights reserved

www.print2flash.com