Hi,
below code, it will rotate globe by mouse control and rorate dynamic also.
my project screen shot link: http://board.flashkit.com/board/attachment.php?attachmentid=74073&d=13 59688599
CD.getMouseRotation = function(){
var x = this._parent._xmouse-this._x;
var y = this._parent._ymouse-this._y;
return Math.atan2(y,x)*180/Math.PI;
};
CD.positionToMouse = function(){
this._lastrotation = this._rotation;
this._rotation = this.getMouseRotation() - this._clickrotation;
};
CD.spin = function(){
this._rotation += this.spinSpeed;
this.spinSpeed *= .9;
};
CD.onPress = function(){
this._clickrotation = this.getMouseRotation() - this._rotation;
this.onEnterFrame = this.positionToMouse;
};
CD.onRelease = CD.onReleaseOutside = function(){
this.spinSpeed = this._rotation - this._lastrotation;
if (this.spinSpeed > 180) this.spinSpeed -= 360;
else if (this.spinSpeed < -180) this.spinSpeed += 360;
this.onEnterFrame = this.spin;
};
My process Screen shot:
http://board.flashkit.com/board/attachment.php?attachmentid=74073&d=13 59688599
Hi Nabren,
I have to rotate globe model by mouse control at the same time, when i click on the globe top, i need to display text, like building means, i have to show building.
these are my task..
thanks.
http://board.flashkit.com/board/attachment.php?attachmentid=74073&d=13 59688599
Hi,
Above i have attached my screen shot of my process.
I have to rotate globe model by mouse control at the same time, when i click on the globe top, i need to display text, like building means, i have to show building.
these are my task..
thanks.
North America
Europe, Middle East and Africa
Asia Pacific