my boss gave me the difficult project. he wants me spin the globe.
now i can spin the globe forward and backward. but has one error that the globe cannot play backward continuous when my mouse is move more than 1/2 of stage width.
it’s should be
forward :: frame 1, 2, 3, 4, …, 24
backward :: frame 24, 23, 22, 21, …, 1
no have error when play on frame 1 - frame 23
find the error when play frame 24
it is
forward :: frame 1, 2, 3, 4, …, 24
and not play backward
and the problem can found when play until the last frame.
someone help me please.
here is code
[LEFT]
stop();
//forward
MovieClip.prototype.playForward = function() {
delete globe.onEnterFrame;
globe.play();
}
//back
MovieClip.prototype.playBack = function() {
globe.onEnterFrame = function() {
//trace(globe._currentframe)
if (globe._currentframe >1) {
globe.prevFrame();
}
else {delete globe.onEnterFrame};
};
};
//mouse event
_root.onMouseMove = function() {
if(_root._xmouse >= (Stage.width)/2){
globe.playForward();
} else {
globe.playBack();
}
}
[/LEFT]
here is link[LEFT]http://www.ckachiangmai.com/run1.swf
I’m a newbie for Kirupa.
Thanks for attention.
[/LEFT]