-
Help with rotation
Hey guys, im in trouble, im doing a webradio player for a client my deadline was on friday and im still stucked on the volume slider.
Well the layout of the player is this:
Attachment 75275
And i need to do this green button, slide around de circle to get more or less volume.
Ive already have a code, that do this, but im not able to customize it, i need that it runs on clockwise, and on my code it is running counterclockwise
Well this is my code:
Code:
onClipEvent (enterFrame) {
if (_root.motion) {
this.thisx = this._x;
this.thisy = this._y;
this.lastx = _parent._xmouse;
this.lasty = _parent._ymouse;
this.xdif = this.thisx-this.lastx;
this.ydif = (this.thisy-this.lasty)*-1;
this.finalrot = Math.atan2(this.xdif, this.ydif);
this.finalrot = ((this.finalrot*180)/Math.PI)-180;
this.finalrot = this.finalrot+360;
if (this.finalrot >= 45 and this.finalrot <= 270) {
this._rotation = this.finalrot;
}
}
}
I dont know nothing about actionscript, do you guys can help me???
thanks a lot
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
|