LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-02-2007, 11:20 PM
forever forever is offline
Registered User
 
Join Date: Jan 2007
Posts: 2
Rep Power: 0
forever is on a distinguished road
Source arm animation help! lock position and follow mouse?

Ok it kinda works but its going the wrong way.

Heres the code
Code:
onClipEvent (load) {
	X = this._x;
	Y = this._y;
}
onClipEvent (mouseMove) {
	Xm = _parent._xmouse;
	Ym = _parent._ymouse;
	Xdiff = Xm-X;
	Ydiff = Ym-Y;
	radAngle = Math.atan2(Ydiff, Xdiff);
	this._rotation = radAngle*75/(2*Math.PI);
	if(radAngle >0 && radAngle <50){
	this._rotation = radAngle}
	updateAfterEvent();
}
Any ideas how to make the hand go the other direction?

Ive tried make it going 180 by changing this part of the code to:
Code:
	this._rotation = radAngle*180/(2*Math.PI);
	if(radAngle >45 && radAngle <45){
	this._rotation = radAngle}
	updateAfterEvent();
}
Heres the links for this interaction:
click here to see the rotating arm
download the .fla here

Last edited by forever : 01-03-2007 at 12:21 PM
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Movieclip to follow mouse dalton Newbies 0 10-17-2008 02:42 PM
Question about mouse click & follow Rudolf Flash MX ActionScript 0 05-22-2005 06:27 PM




All times are GMT. The time now is 08:23 PM.