View Full Version : Look at some of this code I wrote the other day!
slasho
11-23-2008, 07:16 PM
This is some code I wrote! What it does is makes it so that the eyes I drew in flash follow your mouse so it looks like it is looking at your mouse!
Feel Free to use it if you want! It might need a little bit of change to fit your movie!
import flash.events.MouseEvent;
stage.addEventListener (MouseEvent.MOUSE_MOVE, updateEyes);
function updateEyes(e:MouseEvent)
{
if (currentScene.name == "Main Menu")
{
eye_l.mouseMovedTo ((e.stageX - eye_l.x) / eye_l.scaleX,
(e.stageY - eye_l.y) / eye_l.scaleY,
false);
eye_r.mouseMovedTo ((e.stageX - eye_r.x) / eye_r.scaleX,
(e.stageY - eye_r.y) / eye_r.scaleY,
true);
}
}
kornfuzzed
11-23-2008, 08:04 PM
its not working on the page, use a link to get to a page where you need to post it or something, its what i use.
andymac
11-24-2008, 10:38 PM
nice, i had to change it up some though
Eiliosdraye
11-27-2008, 09:09 PM
Are the pupils moving only? If so, I HIGHLY recommend adding a hitTest.
Devoutox
11-29-2008, 09:46 AM
that's surely not your code, you got it from a flash site.
gangste28
12-01-2008, 09:26 PM
im learning actionscript and this may prove handy
gamer654
12-10-2008, 03:57 PM
its not working on the page, use a link to get to a page where you need to post it or something, its what i use.
Yeah . Getting A link wud be an easier and faster way to link to it.
xxchiefxx
12-17-2008, 06:26 PM
Thank you for allowing others with that idea.
Next time add a link.
Much easier to access.
RaptorZ
01-01-2009, 12:50 PM
Nice......
Halogen
01-03-2009, 09:15 PM
Dude. I found this on Google. Lol.
Nitex1337
01-09-2009, 12:25 PM
Cool, I have a friend that cna do stuff like that.
crazyaznslaya2
01-12-2009, 01:43 AM
jeez this thread has been alive for quite sometime now. action scripting has like 2 total threads.
Hejin
01-12-2009, 01:49 AM
You took this from Edubunto. Which can lead to you going to jail for 10 years and paying fines of 10,000$ dollars.
nice steal.
crazyaznslaya2
01-13-2009, 03:16 AM
You took this from Edubunto. Which can lead to you going to jail for 10 years and paying fines of 10,000$ dollars.
nice steal.
doubt it would go that far. And i thought it look familiar. But, yeah that is bad. BAD slasho! >:l
*closed*
sharkitax
02-02-2009, 09:02 AM
dude. I found this on google. Lol.
Pwnt!
I see this script of xat >.>
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.