|
If you place your holomatix.jar file and your launch swf in the same directory as the html page that loads them, then the applet tag created by Blaze 3D Studio will work without alteration.
However, large sites sometimes have content resources stored separately from html files, whether arranged manually or by a content management system. In this case, the applet tag will need to be altered so that the html can find the applet (holomatix.jar) and the applet can find the launch swf. Also, there are optional applet settings which can change the appearence and initial state of your presentation. The codebase attribute When an applet is running on a server, it does not have access to all parts of that server. There is a directory, called the codebase, above which it cannot retrieve files. This directory can be specified in the html applet tag through the codebase attribute. It can be a path relative to the html page: <applet codebase = "./content/myApplet/" ... or an absolute path from the root of the site: <applet codebase = "/base/sites/omega_campaign/content/myApplet/" ... All files used by the applet - holomatix.jar, the launch swf, all other swfs and any resources used by those swfs - must be contained within the codebase directory or subdirectories. If necessary, the codebase can be set to be the root of your site. If the codebase attribute is omitted, it defaults to the directory containing the html file. A word of warning - if you are running your html page locally, then the codebase may not be resolved relative to the html. This will depend upon your machine settings. It is safest to omit the codebase attribute until you are testing from a server over http. The archive attribute The archive attribute is used to specify the location of holomatix.jar. It can be a path relative to the codebase: <applet codebase = "./content/myApplet/" archive="./jars/holomatix.jar" ... or an absolute path from the root of the site: <applet codebase = "./content/myApplet/" archive="/base/sites/omega_campaign/content/myApplet/jars/holomatix.jar" ... Remember though, that holomatix.jar must be inside the codebase directory. The code attribute The code attribute specifies the starting point for the applet. This should always be blaze3d.class: <applet codebase = "./content/myApplet/" archive="./jars/holomatix.jar" code = "blaze3d.class" ... Other applet attributes Other attributes specific to applets are: width - the width of the applet in pixels height - the height of the applet in pixels MAYSCRIPT - if MAYSCRIPT is present, then the applet can get access to the html page that contains it. This is necessary for both the applet calling out to html (for example. when an actionscript getURL call executes) and for javascript calling in to the applet (for example, to demand that the applet refresh its display, or to insert actionscript values with SetVariable).
The src param The Blaze player uses an applet parameter to specify the launch swf. This can be a path relative to the codebase: <applet codebase = "./content/myApplet/" archive="./jars/holomatix.jar" code="blaze3d.class" width="550" height="400" MAYSCRIPT> <param name="src" value="./swfs/my3dMovie.swf"> </applet> or an absolute path from the root of the site: <applet codebase = "./content/myApplet/" archive="./jars/holomatix.jar" code="blaze3d.class" width="550" height="400" MAYSCRIPT> <param name="src" value="/base/sites/omega_campaign/content/myApplet/swfs/my3dMovie.swf"> </applet> but remember that this swf and any other resources used by your presentation must be within the codebase. Other applet params The Blaze player supports other <param> names: FlashVars - this allows you to set initial actionscript variables on the root timeline. It should be in the form:
<param name="FlashVars" value="varName1=value1&varName2=value2&varName3=value3">
Scale - this defines the size of the movie when the applet window is a different size to the swf playing in it. SAlign - this defines the position of the movie when the applet window is a different size to the swf playing in it
All these params are optional. |