Orient an object to the mouse cursor

How to orient an objet to an other ? Just put those lines and change the instance name myTank.
12345678910111213141516// This object will always look at the mouse cursor
myTank.addEventListener(Event.ENTER_FRAME,  tankEnterFrame);
// This function will be launched every frame (25 times by seconds)
function tankEnterFrame(pEvt) {
    // [...]

Posted on January 9, 2010 at 18:17 by admin · Permalink · Leave a comment
  • Share/Bookmark

In: ActionScript, Tutorial · Tagged with: , ,