This works if you make something like a gun with a big laser scope attached to it and make sure that the central rotation point (the little plus) is in the handle of the gun.
The way it works is it calculates the ratio of the difference in X and Y values, then uses them to make a right triangle. By dividing one by the other and taking the arc-tangent, it produces the angle that the thing needs to be rotated by in radians. Multiply that by [180/Math.PI] and you have it in degrees.
I also had a problem where this would only work if the mouse was to the right of the symbol. The first two "if" statements fix that.
I hope this helps someone! You can use it, but just make sure you tell me so that I know it was useful!
As long as you make no money from it(AKA as in ArmorGames sponsoring you and sending you money). But if you were planning on making money might as well spend the 700$ cause the sponsorship could pay for the entire fee of the flash program, you'd only make a few bucks but it's profit!
Also, I realized what you meant and I went ahead and changed my code. Now, instead of flipping the image when the mouse is to the left, it changes the rotation so it's facing the correct way. With it, I coded a little missile to follow my mouse (it was kewl).
But, yeah, is that the weaknesss in my code you were referring to?
Sounds good. And by a missile following your mouse I presume all you did is have an MC with the missile MC inside and on the actions of the missile MC all you need is this._x += 5; looping the entire time and have the parent MC rotating and the missile follows.