/ Published in: ActionScript 3
Simple swing animation logic
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var force = 20; var t = 0; function swing() { t += 0.3; this._rotation = Math.cos(t) * force; }