Light angles from your mouse

Not sure if this is even possible with flash but im looking for a way to make your mouse a source of light emission that changes the way its angled based on the position of your mouse like sun beams. If you have ever tried this and have some tips or even the source code (yes I stoop to any level hehe), I would name my first child after you. Thanks in advance.

Well… If all you need is to get the angle, then it is more likely the math stuff, I guess…

You can get the curent mouse location with _xmouse and _ymouse, right??? Store them to the variable…
Check if the mouse is moving or not by using onMouseMove handler, and give some time and check the last known mouse location… Store them again to the variable…

Now you have the coordinate of the starting position and the ending position, so do the math to get the angle with it… I don’t want to open my old math book, so you do the math… :stuck_out_tongue:

it depends what you’re lighting. I know Flashkit has a nice file (actually I think its a tutorial) on doing that with faceted edges with a diamond shape thing
… a quick search brought it up
http://www.flashkit.com/tutorials/3D/Lighting-Mr10-678/index.php

should be able to help you out. The menu (circle at the bottom) lets you control the light with your mouse by turning autopath off.

http://www.robertpenner.com/index2.html

Have a look at the shading fla over there. It might be usefull…