The usual means of communicating with the arcticPigs plugin is via the JavaScript language (or Microsoft's version of it, JScript). Using JavaScript, you can call methods of the plugin classes, access properties, and handle event notification messages from the plugin.
For notification messages, the <script> tag should contain the name of the arcticPigs plugin for which the message will be handled (since you can have more than one plugin on the same page), and the name of the message being handled:
<script type="text/javascript" for="arctic" event="onModelLoaded(mfModelfile)"> alert( "Model " + mf.Modelfile.name + " has just been loaded." ); </script>
The above code doesn't do much — when a model has finished loading, the script simply pops up an alert box and indicates the model's name. This code is executed only for the plugin named "arctic".
A plugin's name can be specified in the <object> tag. By default, the main plugin is named "arctic" when exporting pages from the arcticPigs exporter. This can be changed by altering the id parameter:
<object classid="CLSID:A9DAD15A-365E-494d-9D41-8A0BB80007B0" codebase="http:\\www.arcticpigs.com\activex\mayhem.cab#version=-1,-1,-1,-1" style="display:block; float:right; height:240px; width:320px; margin-left:20px" id="window3d"> </object>
In this case, the plugin will be referred to by the name window3d in all notification handlers and method calls:
<script type="text/javascript" for="window3d" event="onModelLoaded(mfModelfile)">
alert( "Model " + mf.Modelfile.name + " has just been loaded." );
</script>
.
.
.
window3d.loadChor("Examples/example1.chor");