PDA

View Full Version : Volume Control (Help!)


medina07
03-24-2007, 12:04 PM
Hello, greetings to all.
My problem is the following one: I am working on an audio player, up to now everything works marvelously (plugins and buttons), but I would like to change the volume slider for one that rotates to increase or decrease the volume (I don't have idea of as making work this object). please HELP!!!:rolleyes :rolleyes :rolleyes

yosik
03-25-2007, 08:26 AM
The only way I can see this to work is to use a Flash object and pass the rotation of a movieclip in flash to AMS via a FSCommand.

Yossi

Protocol
03-26-2007, 02:05 PM
To keep filesize down, and looking at the image you have posted, I would separate the image into 3 components:

1) The larger dial (bottom portion)
2) The smaller notch (where their finger would go) - create a transparent png
3) The volume bars (on the upper left)

A) I would then use the OnClick function on the Notch image to detect the user clicking on the Notch portion (I would also use a cool little hand icon when the user hovers over the notch portion of this volume dial) =D

B) Using the Mouse Click Down function of the notch image, when the user clicks on the notch image (let's call this the notch), it sets a condition True...say: "NotchGrabbed = true"

C) ...

Okay...I went on and on for like 2 pages, but it may be too complicated or vague for you to understand just with words. Essentially, you can do this using the Get Mouse Position and Set Image Postion functions.

It is possible and wouldn't take too much coding. I've done a couple of projects like this and accomplished variations of what you're looking for with no problems.

Basicly, when the user clicks on the notch, it follows their mouse on a coordinate map until the user lets go of the mouse. Obviously, you'd set the volume and the volume bar to follow accordingly. These kinds of projects are fun...so have away!

If you still need help getting it done and are against a deadline,let me know and I'll code a skeleton project for you...

Protocl