<3dobject> DEF script-@id Script { field SFNode me USE script-@id field SFNode channel USE @id field SFNode slide USE @the_id field SFVec3f orig_location 0 0 0 field SFRotation orig_rotation 0 0 0 0 field SFVec3f orig_scale 1 1 1 field SFInt32 from @from field SFInt32 to @to field SFVec3f translation @translation field SFRotation rotation @rotation field SFVec3f scale @scale eventIn SFInt32 level url "javascript: function initialize() { orig_location = channel.location; orig_rotation = channel.rotation; orig_location = channel.location; Browser.addRoute(slide,'level',me,'level'); } function shutdown() { Browser.deleteRoute(slide,'level',me,'level'); } function level(value,time) { if (value > from && ( to == -1 || value <= to )) { channel.location = translation; channel.rotation = rotation; channel.scale = scale; } else { channel.location = orig_location; channel.rotation = orig_rotation; channel.scale = orig_scale; } }" }