top of script window
nru code snippet | show it | return |
Lingo
on changeRoom dest
  -- called when exiting one room or area where
  -- the help screen needs to change.
  
  -- if gizmo is active, send message to javascript
  -- and put up appropriate html for help screen for
  -- the next room
  
  if gHasGizmo then
    -- update the help screen for the room
    
    if gNetScape then
      -- call JavaScript to update and load gizmo (only for NetScape)
      getNetText ( "javascript:updateRoom('" & dest & "')" )
    else
      -- net call to update Gizmo for MSIE
      gotoNetPage ( ( gServerURL & "help_" & dest & ".html" ), "giz_mid" )
    end if
    
  end if
end


JavaScript
...
function updateRoom( str ) {
// This function is called from shockwave to update the current room location and
// call sthe update function
	gRoom = str;
	updateGizmo();
	
}

function updateGizmo () {
// This function is called from this script or from the script in the gizmo
// frame to target the middle frame of the gizmo with the correct help screen
	parent.giz_mid.location.href = "help_" + gRoom + ".html";
}

..



The rooms in NRU are traversed by clicking on invisible quick draw shapes, each passing to this movie hander the destination file name for the next room. We also need to tell the browser to load a different room description into another web frame. NetScape can directly address Javascript functions, but at the time we created this, the only way for it to work in internet explorer, was to do it via a CGI call. The HTML embed params sent a code to identify the browser.

lingo era = v5 Because each scence was a different movie, we had to have the same movie handlers in each movie (this was before external casts could be shared), which also was not pleasetn when a script needed to be modified! The globals could be used anywhere though.