|
||
| Inside Technique : Animation Toolkit : Custom Path Demo You have now seen how to define a custom Path object. In this demonstration, we show you how the custom Path integrates back into the overall animation toolkit. To see the SinusPath in action, push the button below The animation has the following code placed in the head: <script type="text/javascript" src="path.js"></script>
<script type="text/javascript" src="straightPath.js"></script>
<script type="text/javascript" src="circlePath.js"></script>
<!-- Include our sinusPath object -->
<script type="text/javascript" src="sinusPath.js"></script>
<script type="text/javascript" src="animator.js"></script>
<script type="text/javascript">
<!--
p1 = new SinusPath(600,50,150,30,50);
p2 = new StraightPath(100,100,100,100,0); // Used to move the sinus path
p = p1.add(p2).rotate(100,100,20); // And a rotation just to show you how :-)
a = new Animator("globe",p,50); // Animate the folder along the path p
a.onanimationdone = "a.stop();a.play()";
//-->
</script>
...and the buttons just use Page 1:Animation Toolkit © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |