<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='ScriptSyntaxExample.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='8 January 2000'/>
<meta name='modifiedcontent='1 March 2016'/>
<meta name='descriptioncontent='Script node syntax example.'/>
<meta name='infocontent='Test scene that validates but does not render.'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Basic/development/ScriptSyntaxExample.x3d '/>
<meta name='generatorcontent='X3D-Edit, http://www.web3d.org/x3d/content/README.X3D-Edit.txt'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for DEF node : myScript
-->
<Scene>
<Shape>
<Text string='"Script node syntax example" "view source to see translation"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material diffuseColor='0.7 0.4 0.1'/>
</Appearance>
</Shape>
<Script DEF='myScript'
  url=' "NoSuchScript1.js" "http://www.web3d.org/x3d/content/examples/Basic/development/NoSuchScript2.class.ignore" '>
<field name='someSFBooltype='SFBoolaccessType='inputOnly'/>
<field name='someMFInt32type='MFInt32accessType='outputOnly'/>
<field name='someMFFloatstype='MFFloatvalue='0.0 1.0 2.0accessType='initializeOnly'/>
<field name='someStringFieldtype='SFStringvalue='helloaccessType='initializeOnly'/>
<field name='stringTest1type='MFStringvalue='"'" "apostrophe"accessType='initializeOnly'/>
<field name='stringTest2type='MFStringvalue='"\&quot;" "quote"accessType='initializeOnly'/>
<field name='someInitializedRotationtype='SFRotationvalue='0 1 0 0accessType='initializeOnly'/>
<field name='someInitializedTimetype='SFTimevalue='0accessType='initializeOnly'/>
<![CDATA[
      
ecmascript:

// Preferred style for inlined script code is contained CDATA
// in order to simplify use of characters < > " " ' ' etc. in source code

// When inlined script code appears in url instead, XML special characters
// must be carefully 'escaped' or an incorrect translation will result.

// url appears before contained code when translating to VRML encoding,
// so that external (possibly updated) code scripts can take precedence

function someSFBool (value, timestamp)
{
	someMFInt32 = 0; // set outputOnly event, for example
}

    
]]>
</Script>
</Scene>
</X3D>
<!--

Index for DEF node : myScript
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/> -->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->