I’m looking for a way to create a wiggle motion for a movie clip, but I only need the wiggle to occur two times. If you create a line movie clip and give it an instance name of “bar_mc” you can play with this code to see what I’m talking about:
function rotateMC() {
var posRotateMC = new mx.transitions.Tween(_root.bar_mc, "_rotation", mx.transitions.easing.None.easeNone, 0, 5, 0.1, true);
posRotateMC.onMotionFinished = function() {
var negRotateMC = new mx.transitions.Tween(_root.bar_mc, "_rotation", mx.transitions.easing.None.easeNone, 5, -5, 0.1, true);
negRotateMC.onMotionFinished = function() {
negRotateMC.continueTo(0, 0.1);
};
};
}
timer = setInterval(rotateMC, 1000);
//rotateMC();
It would be nice to script this without the Tween Class since that glitches.