Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 07-12-08   #1 (permalink)
WaterCooler
 
getllamasfast's Avatar
 
amd ati

Join Date: Dec 2006
Posts: 1,103

Rep: 54 getllamasfast is acknowledged by some
Unique Rep: 48
Trader Rating: 0
Default need a little help with actionscript!

I'm just messing around with actionscript and I wanted to make a movieclip always face the mouse. How would I go about to do this?
EDIT: Nevermind I got it!
Here it is if anyone ever needs it:
Code:
personTurning = function ()
{
	var x:Number = (_xmouse - _root.person1._x)
	var y:Number = (_ymouse - _root.person1._y)
	var angleInRadian = Math.atan2(y,x)
	angleInRadian += (Math.PI/2)
	var angleInDegrees = angleInRadian *(180/Math.PI)
	_root.person1._rotation = angleInDegrees
}
person1 is the movieclip that you want to be facing the mouse
__________________
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this.
Mah Zune card!
3DMarkVantage: 4958

System: La Computadora de Getllamasfast
CPU
AMD X2 5000+ BE @ 3.008 24/7
Motherboard
GA-M57SLi-S4
Memory
2 x 2gb Patriot DDR2 800
Graphics Card
Diamond 4870x2
Hard Drive
500Gb WD + 500Gb Seagate
Sound Card
Creative X-FI Extreme Music + Denon AVR-2700
Power Supply
Corsair HX620w
Case
Gigabyte 3D Aurora <- Returned for Aurora 570 :)
CPU cooling
Apogee GT + PA120.3
GPU cooling
MCW-60 + PA120.3
OS
Vista Home Premium 64-bit
Monitor
Samsung 2232gw

Last edited by getllamasfast : 07-13-08 at 05:12 PM.
getllamasfast is offline   Reply With Quote
Old 07-14-08   #2 (permalink)
New to Overclock.net
 
intel nvidia

Join Date: May 2008
Posts: 213

Rep: 7 nickbunyun Unknown
Unique Rep: 5
Trader Rating: 0
Default

i tried it it doesnt work...

im guessings its AS2.0 right ?
__________________
System: Jesus Loves you! <>< John 3:16
CPU
Intel Quad Core Q9450
Motherboard
DFI X48 LanParty
Memory
G.SKILL 4GB (2 x 2GB)DDR2 1066
Graphics Card
Zotac 8800GTS 512MB
Hard Drive
80GB @ 7200 RPM
Power Supply
OCZ StealthXStream 600W
Case
Tagan Aplus
CPU cooling
Tuniq Tower 120
OS
Windows XP Pro SP2
Monitor
1280x1024
nickbunyun is offline   Reply With Quote
Reply



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



All times are GMT -4. The time now is 08:42 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.11331 seconds with 9 queries