-
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:
x29dzgqa.jpg
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; } } }
Exclamation Hlp 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 attached here.
And i nedd 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:
ActionScript 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
-
Prid - Outing
Hi,
it would help a lot of if you could post your FLA file as well, as I'm scratching my head over where to put your code.
Upload it to TinyUpload and post the link here
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Oh, sorry, heheheh, its here: http://s000.tinyupload.com/download....97207490419066
Into te stage, the green butto is a movieclipe into the container movieclipe, then you click on the green button and select actions the code is there
Thank you very much
-
.
Hi,
without having looked at your file yet, try here http://www.*******.com/tutorials/volume-controller.htm
link does not work, replace ******* with so think - no space
or look here
http://board.flashkit.com/board/show...Volume-Control
Last edited by fruitbeard; 03-02-2015 at 09:39 AM.
-
Thank you guys, this last link sent by fruitbeard saved my life.
Thank you very much
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
|