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:
; PrintOMatic Lite from Electronic Ink [#namePPC:"PrintOMatic Lite Xtra", #nameW32:"PMLITE.X32"]
; Electronic Ink Xtras
; http://www.printomatic.com/
;
[#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"]
Do the following for every movie that uses an Electronic Ink Xtra:
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.
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." return false end if repeat with i = 1 to the number of xtras if the name of xtra i = xtraName then return true end repeat return false end
Then, whenever you want to use printing functions, use the code below:
if isXtraInstalled("PrintOMatic") then -- place your PrintOMatic code here else -- place your non-PrintOMatic code (alert dialog, etc) here end if
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 end if end beginSprite
This will prevent the user from clicking on the button. Similarly, the following might be a way to handle registering or instantiating the xtra:
on startMovie if isXtraInstalled("PrintOMatic") then register xtra("PrintOMatic", "xxxx-xxxx-xxxx") end if end
You can view properly configured Shockwave versions of the PrintOMatic and PrintOMatic Lite demo movies on our web site:
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.
To view this and other technical notes on-line, visit http://www.printomatic.com/tech.cfm.