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


1 DEF Example_1 Script {
2 field SFColor currentColor 0 0 0
3 eventIn SFColor colorIn
4 eventOut SFBool isRed
5 url "javascript:
6 function colorIn(newColor, ts) {
7 // This method is called when a colorIn event is received
8 currentColor = newColor;
9 }
10 function eventsProcessed( ) {
11 if (currentColor[0] >= 0.5) // if red is at or above 50%
12 isRed = true;
13 }"
14 }

in Table To:


© 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 Nov 29 1998