These two event handlers do the main initialisations. The OnScriptReady handler limits the render quality of the movie control slider. The idea behind this is that it is better to use the computation slice for the main scene rather than creating a very dense polygon model for the slider (which you will not notice anyhow)

The OnModelInstanced event handler does the main initialisations for the Movie Player web page. All models will fire this event so you need to test which object you are handling. The test on the handling mode being equal to 1 is a quick (and dirty) test for the slider button as this is the only model instance that can be moved around (handlingmode = 1). For the slider model all events are added to the model whereas the '_moviecontrol' model has events added only to certain groups.


<SCRIPT Language="JScript" for="movieplayer" event="OnScriptReady(sScript)">
	if(  movieplayer.window.renderQuality < 0.8) {
		movieplayer.window.autoRenderQuality = false;
		movieplayer.window.renderQuality = 0.8;
	}
</SCRIPT>

<SCRIPT Language="JScript" for="movieplayer" event="OnModelInstanced(sModel)">
	if(sModel.handling == 1) {
		hSlider = sModel;
		hSlider.onlbuttondown = StartLocationChange;
		hSlider.onlbuttonup = EndLocationChange;
		hSlider.ondrag = OnSliderDrag;
		bMPTimerReady = true; // possible to start timer
		StartSliderTimer();
	}
	else if(sModel.name == "Shortcut to _moviecontrol") {
		hPlayLight = sModel.groups("playlight");
		hPauseLight = sModel.groups("pauselight");
		sModel.groups("play").onclick = new Function("SetMode(mPlay)");
		sModel.groups("pause").onclick = new Function("SetMode(mPause)");
		sModel.groups("panic").onclick = new Function("arctic.world.camera.clearOffsets(0)");

		// initialise
		hPlayLight.ambient = 0.9;
		hPauseLight.ambient = 0;
		mode = mPlay;
	}
</SCRIPT>

 

©2000 arcticpigs. All rights reserved.
This is a draft version! The functionality of parts of the software are liable to change.