The Hover Object will hover a layer in a straight-line.
Initialization:
objectName.hover = new Hover("objectName","hover")
Example:
mylayer = new DynLayer("mylayerDiv") mylayer.hover = new Hover("mylayer","hover")
The play() Method:
The play() method begins the hover motion:
objectName.hover.play(amplitude,angleinc,angle,cycles,orientation,speed,fn)
Examples:
mylayer.hover.play(60,8,0,1,'v',10)
The pause() and stop() Methods:
Work the same as in the circle() method.
Demo:
View hover1.html for a hover example.
Download: hover.js
View Source: hover.js
Home | Next Lesson: Path Animation |