« Math Curriculum Mobile Lab Features Shockwave Content | Main | Kaptein Sabeltann: PS1 quality 3D using Director! »

January 06, 2005

New Publish Templates for Director MX and MX 2004

Over the past two releases the publish templates included with Macromedia Director (versions MX and MX 2004) haven't changed much. Due to hearing requests for it a number of times recently I've produced some updated publish templates as well as a separate *.js file that contain what I feel is more robust Shockwave Player detection code. To start, I've posted a few files on my poppy site for folks to download:

browser-based shockwave player detection code

Once you've downloaded the files available there you can update your installation of Macromedia Director with these new templates as well as use the *.js file for separate use in pages where a more customized experience is desired. Here are some very brief instructions on how to do each of these tasks.

Update Your Publish Templates
There are two new publish template files available at the URL above, one that verifies that the user has at least Shockwave Player 8.5 installed (MX_Detect.htm) and another that verifies that they have Shockwave Player 10.1 installed (MX04_Detect.htm). Once you've downloaded these files simply quit out of Macromedia Director (if it's running) and use these to replace the files found in the Publish Templates sub-folder. Once you restart Macromedia Director you can use these new detection templates when you publish your Shockwave Content.

Note: if you download and view these template files you'll see at the top of the JavaScript code that the required minimum major/minor version is set through a pair of variables, change those as needed.

Using the JS file to get the installed player version
Download the available *.js file and either copy the code in-line into your page or simply link against the *.js file. Once you've done that you can then call the getSWVersion() function and it will return a string that indicates the version of the Shockwave Player that was detected. If the user has Shockwave 7 or newer installed then the version will be returned as a string using the format of "m.n" where m is the major version found and n the minor version found. If the user doesn't have the Shockwave Player installed, or they have a version prior to Shockwave 7, then an empty string will be returned.

Be careful, the function returns a string and not a number so you must parse it if necessary.


All of this information is destined for the Macromedia Director Support Center as part of the following two tech notes:

Tech Note 14789: Site design strategies for Shockwave Player detection
Tech Note 15722: Detecting Shockwave Player using JavaScript


Enjoy!

Posted by thiggins at January 6, 2005 02:11 PM