Tech Note: Shockwave and Our Xtras
PrintOMatic Lite MX Xtra, PrintOMatic Lite Xtra 1.6.5, PrintOMatic MX Xtra, PrintOMatic Xtra 1.6.5, Table Xtra 1.0
Many Electronic Ink Xtras, including PrintOMatic, PrintOMatic Lite, and the Table Xtra, have been created "safe for Shockwave", and are available for use and auto-download in your Shockwave movies.
This only is a brief note about using Xtras in the Shockwave environment. For complete background on creating Shockwave movies, please read the appropriate Shockwave-specific chapters of your Using Director manual.
In order to use Xtras in Shockwave, you must prepare your Shockwave movie to auto-download an Xtra from the Internet when the end-user doesn't have the Xtra installed. Also, the end-user's Web browser must have the Shockwave plugin installed, and have access to www.printomatic.com, to auto-dowload the Xtras from the Internet if needed.
The XTRAINFO.TXT file is located in the same folder as the Director application. Director uses this file to determine the "auto-downloading" information for any Xtras you want to use with Shockwave.
The version of XTRAINFO.TXT that ships with Director does not contain the correct information about all of Electronic Ink's Xtras. You must modify this file in order to use these Xtras with Shockwave:
After you have modified the XTRAINFO.TXT files, you can add "auto-download" information to your Shockwave movies.
- Make sure the Director application is not running.
- Open the XTRAINFO.TXT file using any text editor This file is located in the same folder as Director.
- Find the lines in the original file (if they exist) that look like this:
; PrintOMatic Lite from Electronic Ink
[#namePPC:"PrintOMatic Lite Xtra", #nameW32:"PMLITE.X32"]
- Replace those lines with the following text (or add these lines if none exist yet). Watch the line breaks in the text below!. When you copy-and-paste the text, there should 3 comment lines at the top, and ONE line of text for each xtra):
; Electronic Ink Xtras
[#namePPC:"PrintOMatic MX", #nameW32:"PrintOMatic MX.x32", #package:"http://www.printomatic.com/packages/PMaticMX", #info:"http://www.printomatic.com/products.cfm?page=1"]
[#namePPC:"PrintOMatic Lite MX", #nameW32:"PrintOMatic Lite MX.x32", #package:"http://www.printomatic.com/packages/PMLiteMX", #info:"http://www.printomatic.com/products.cfm?page=2"]
[#namePPC:"PrintOMatic Lite Xtra", #nameW32:"PMLITE.X32", #package:"http://www.printomatic.com/packages/PMLite"]
[#namePPC:"PrintOMatic Xtra", #nameW32:"PMATIC.X32", #package:"http://www.printomatic.com/packages/PMatic"]
[#namePPC:"Table Xtra", #nameW32:"Table.x32", #package:"http://www.printomatic.com/packages/Table", #info:"http://www.printomatic.com/products.cfm?page=3"]
Modifying Your Movies
Do the following for every movie that uses an Electronic Ink Xtra:
When you save your movie as a Shockwave .DCR file, it will be able to automatically download the Xtra when it is needed.
- Make sure you have an active Internet connection. You will NOT be able to add Xtras to your Shockwave movie without an active connection.
- Open the Director movie that uses the Xtra
- Open the Movie Xtras dialog box by selecting Modify -> Movie -> Xtras from Director's Menu bar.
- Find the Xtra you are using in the list of Xtras. In Windows, the file name for the PrintOMatic Xtra is PMATIC.X32, and for PrintOMatic Lite, it's PMLITE.X32. For the Table Xtra, it's TABLE.X32 On the Macintosh, the Xtras are denoted by their full names: "PrintOMatic Xtra", "PrintOMatic Lite Xtra", and "Table Xtra".
- If you don't see the Xtra in this list, click the "Add" button, and locate the proper Xtra file(s) in the complete list of Xtras.
- Select the Xtra in the list, and turn on the options "Include in Projector" and "Download if Needed". When you turn on "Download if Needed", Director will connect to www.printomatic.com to check for the downloadable Xtra "packages".
Installing Shockwave in a Web Browser
Internet Explorer will install the Shockwave plugin automatically when it encounter a Shockwave movie on a web page.
When Internet Explorer encounters a Shockwave movie, it will connect to Macromedia's web site to begin the download process, and launch the Shockwave Installation Wizard. Depending upon the speed of the Internet connection, this installation process can take from 1 to 20 minutes.
When a Netscape browser encounters a Shockwave movie, you will be directed to a download page at Macromedia. Click the "download" button in the first panel on this page to download the installer program. When downloading is complete, you must quit your web browser and run the installer. Then, the installer will automatically launch your browser again to complete installation.
After the installation process is complete, the web Browser can load and play the Shockwave movie.
If a Shockwave movie has been properly configured, the Shockwave plugin will download any needed Xtras after loading the movie. All of Electronic Ink's Xtra packages are located at http://www.printomatic.com/packages/ In many browsers, the Status Bar will display the message "Downloading Xtras". The end-user will be presented with a confirmation dialog describing the Xtra, and the user must confirm the installation. After the user confirms the installation, the Xtra will be placed in Shockwave's Xtras folder.
What if users decline to download the Xtra?
Users can choose NOT to download Xtras when running Shockwave movies. Your code should defend against this situation. If you are using the PrintOMatic Xtra, design your interface and coding approach to accomodate both printing and not printing. If you are using the Table Xtra, you'll probably want to QUIT your presentation if the user didn't download the Xtra.
The first thing you need to do is add an isXtraInstalled script to one of your GLOBAL script cast members:
on isXtraInstalled xtraName
if not stringP(xtraName) then
alert "isXtraInstalled() requires an Xtra name to work."
repeat with i = 1 to the number of xtras
if the name of xtra i = xtraName then return true
Then, whenever you want to use printing functions, use the code below:
if isXtraInstalled("PrintOMatic") then
-- place your PrintOMatic code here
-- place your non-PrintOMatic code (alert dialog, etc) here
Two suggested uses of the above include when the PrintOMatic Xtra is registered and/or instantiated, and prior to any printing function being executed. The best approach for the latter example might be to change your interface. For example, if your printing function is triggered from a button, you might include the following in a sprite behavior:
on beginSprite me
if not isXtraInstalled("PrintOMatic") then
sprite(me.spriteNum).locH = -500
This will prevent the user from clicking on the button.
Similarly, the following might be a way to handle registering or instantiating the xtra:
if isXtraInstalled("PrintOMatic") then
register xtra("PrintOMatic", "xxxx-xxxx-xxxx")
Try It Out
You can view properly configured Shockwave versions of the PrintOMatic and PrintOMatic Lite demo movies on our web site:
Hosting Your Own Package Files
If you're so inclined, you can host your own package files for our Xtras. Read our tech note Hosting Your Own Shockwave Package Files for details.