# Help me to spin the globe please

**URL:** https://forum.kirupa.com/t/help-me-to-spin-the-globe-please/193264
**Category:** Uncategorized
**Created:** [July 10, 2006, 8:00am UTC](https://forum.kirupa.com/t/help-me-to-spin-the-globe-please/193264 "2006-07-10T08:00:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![toncrub](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@toncrub](https://forum.kirupa.com/u/toncrub)
#### Post date: [July 10, 2006, 8:00am UTC](https://forum.kirupa.com/t/help-me-to-spin-the-globe-please/193264/1 "2006-07-10T08:00:13Z")

</div>

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]

```auto
 
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](http://www.ckachiangmai.com/run1.swf)

I’m a newbie for Kirupa.  
Thanks for attention. 😃  
[/LEFT]
