The Parabola Object will slide the layer along a parabolic path.
Initialization:
objectName.parabola = new Parabola("objectName","parabola")
Example:
mylayer = new DynLayer("mylayerDiv") mylayer.parabola = new Parabola("mylayer","parabola")
The play() Method:
The play() method begins the parabola:
objectName.parabola.play(type,distx,disty,xinc,speed,fn)
Examples:
mylayer.parabola.play(1,200,200,5,20)
The stop() Methods:
Work the same as in the circle() method. I didn't bother with a pause method cause I can't see it being useful.
objectName.sinewave.stop()
Demo:
View parabola1.html for a parabola demo.
Download: parabola.js
View Source: parabola.js
Home | Next Lesson: Path Animation |