home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / source / chap17 / saucer2.avr < prev    next >
Encoding:
Text File  |  1996-08-02  |  784 b   |  21 lines

  1. // ActiveVRML 1.0 ASCII
  2. // Saucer2 Sample Script
  3.  
  4. // The first step is to import the raw media for our sample
  5. shipred = first (import ("shipred.gif"));
  6. shipblue = first (import ("shipblue.gif"));
  7. mountain = first (import("mountain.gif"));
  8. clouds = first (import("clouds.gif"));
  9.  
  10. // The saucer will alternate between two different images
  11. saucer = shipred until predicate (time > 1) => 
  12.     (shipblue until predicate (time > 1) => saucer);
  13.  
  14. // Define a 2D transformation to describe the saucer's position
  15. movement = translate (0.005 * time - 0.05, 0.007);
  16.  
  17. // Define a new saucer object that has movement applied to it
  18. activesaucer = transformImage (movement, saucer);
  19.  
  20. // Define the expression used for display output
  21. model = mountain over activesaucer over clouds;