Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Analogue Dial 1

Status
Not open for further replies.

CrazyJR

Programmer
Oct 3, 2001
5
AU
OK, I've asked about how to do this before in Flash, but now I need to do it in Shockwave format and I need to do it from scratch, rather than importing a Flash clip.

So here goes:

I need to make an analogue-look dial, such as the one used as a volume control in the standard Win2K CD player, as a menu. I need it so the user clicks and holds down part of the dial and drags it around so the pointer is resting on a certain location around the dial (as you would in real life with a dial). Once it is in this position another part of the stage would display the corresponding section of the movie.

Thanks in advance.

( is an example of a similar thing done in Flash)
 
The rotation is reasonably easy, check the mouse state and alter the rotation of the sprite. If the dial cant do full circles I would just go for a x mouse position to decide rotation rather than the x, y you have in the flash. Faster rotation would be nice too if its part of an interface, that would drive me nuts waiting for it to catch up with me.

Probably just use a series of
if rotation > x and rotation < y then
show this screen area.
else if .......
and so on.


 
OK, I've got it to rotate when you hold the mouse down and that, I need to know how to get it to show the right image/section when the dial is pointed at the corresponding menu section.
 
If all you did was change the rotation then its easy enough

on exitframe

if sprite(x).rotation > 0 and sprite(x).rotation < 100 then
-- swap in image 1
else if sprite(x).rotation > 100 and sprite(x).rotation <200 then
-- swap i image 2
else if repeat for as many sections you have

end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top