-
how to combine two movie clip and rotate together in flash action script 2.0
Hi,
I have two movie clips.
I have attached screen shot of movie clip.
1. Movie clip : CD
below code rotate globe by mouse control.
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;
};
2. Movie clip : AE
below code rotate dynamic.
onEnterFrame = function(){
AE._rotation+=2;
}
how to combine two movie clip and rotate together.
could you guide me.
banner_step_1.jpg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|