Basic HTML version of Foils prepared 5 August 97

Foil 7 EventIn Handling - eventsProcessed() - II

From VRML97 Scripting: JavaScript Nodes UC Web Applications Certificate -- July 24 1997. by Wojtek Furmanski and Hasan Ozdemir


DEF Example_1 Script {
field SFColor currentColor 0 0 0
eventIn SFColor colorIn
eventOut SFBool isRed
url "javascript:
function colorIn(newColor, ts) {
// This method is called when a colorIn event is received
currentColor = newColor;
}
function eventsProcessed( ) {
if (currentColor[0] >= 0.5) // if red is at or above 50%
isRed = true;
}"
}



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 5 1998