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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message to WANGBAR!!! I was told b 1

Status
Not open for further replies.

Ionutzvlad

Technical User
Nov 1, 2002
10
RO
Message to WANGBAR!!!
I was told by David that you are the one who could help me!
Please find my thread with the telephone disc.
And look at the replies. Could you make them work?
At the frozepeas code I don't have a .fla file and I couldn't make it work myself. And the david's code has some mistakes. (for example when you try to drag the 1 button it goes to nr 3-and then you may rotate the disc.)
Thanks
Ionutzvlad
 
Is frozenpeas .fla working the way you want, if so cool, or would you still like some help with this? If so - Flash 5 or MX?
 
I still would like some help after all. the frozenpeas movie works apparently only in Flash MX. And I only have Flash 5. And besides that I would like if possible , after you drag the button down and after it comes back (released)into its originaly position to load a page. A new page
Thanks again
Ionutz
 
Here's the code (Flash 5) - this version doesn't jump when you first click a number. No .fla but this code will fit in with Dave's file and keeps to the same structure as Dave and Frozen's posts so it should be easy to use...I've triggered the 'pressed' flag from the clipevent so that everything's in the same place but it could just as easily be triggered from the buttons in Dave's file (especially if you're going to go to other pages using this as navigation)

Code:
onClipEvent (load) {
	//initial set up
	pressed = false;
	rest = _rotation;
	speed = 5;
}
onClipEvent (mouseDown) {
	//set 'pressed' and calclate initial angle to subtract from moving dial
	pressed = true;
	diff = (Math.floor(180*Math.atan2(_ymouse, _xmouse)/Math.PI)+90);
}
onClipEvent (mouseUp) {
	//reset pressed
	pressed = false;
}
onClipEvent (enterFrame) {
	if (pressed) {
		//move dial with mouse
		_rotation += (Math.floor(180*Math.atan2(_ymouse, _xmouse)/Math.PI)+90)-diff;
	} else {
		//move back when released
		_rotation += (rest-_rotation)/speed;
	}
}
 
Nice one wangbar I'm just stupid really Regards
David Byng
spider.gif

davidbyng@hotmail.com
 
Thanks guys, for all your help!
Though,Wangbar, I don't know why your .fla file doesn't open in my Flash 5 programm. But I saw the html. file and it is really OK. Now how can I load a page after the return of the dial into its original position? can you make it for 2 buttons? I mean, after you've dragged the nr.1 button to go to a page and after you dragged the nr.2 button on the dial to load a different page.
Thanks You are a genius!
 
I forgot and saved it as MX - I've just mailed a Flash 5 version to you...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top