I have 2 objects on stage, pane (which rotates) and topbut (which initiates the rotation)
Currently onRollOver of topbut rotates pane indefinitely, what I’d like it to do is stop once the rotation has gone through 180 degrees.
Here’s the AS, any pointers in the right direction would be appreciated.
Thanks,
pwb.
[AS]var angle:Number = 180;
_root.createEmptyMovieClip(“temp”, _root.getNextHighestDepth());
rotapos = function (movie, angle) {
temp.onEnterFrame = function() {
movie._rotation += 10;
if (movie._rotation<=angle) {
delete rotapos;
}
};
};
topbut.onRollOver = function() {
_root.rotapos(pane, angle);
trace(angle);
};
[/AS]