arcticPigs release V1.0 helpefiles |
Example: The Movie Player script (1) |
Below the OnCreate handlers for both 3D windows are defined. Both handlers load a choreography and create and initialise the script.
<SCRIPT Language="JScript" for="arctic" event="OnCreate()">
// Create a new script to hold the chor
hMain = arctic.world.newScript("main")
// timer stuff to update the slider button
bMainTimerReady = true;
StartSliderTimer();
// Load choreography
arctic.doc.loadChor("AlienSong/AlienSong.chor")
hChor = arctic.doc.chorFiles("AlienSong")
// Add the chor to the script
hMain.addChoreography("AlienSong")
// Start the script.
hMain.start()
</SCRIPT>
<SCRIPT Language="JScript" for="movieplayer" event="OnCreate()">
var hplayerscript = movieplayer.world.newScript("main")
arctic.doc.loadChor("./ixSlider/ixslider.chor")
hplayerscript.addChoreography("ixslider")
hplayerscript.start()
// disallow camera handling
movieplayer.world.camera.handling= 0;
// disallow context menu
movieplayer.window.allowContextMenu = false;
</SCRIPT>
Last Updated: 07/01/02 |