Komunitas Belajar Swishmax Indonesia

Home Tutorial Swishmax Script Hadap ke mouse
Hadap ke mouse

Scriptnya sangat sederhana sekali

 

onSelfEvent (load) {

    var dx,dy;

    var clip = arrow;

}

onFrame (1) {

    this.onEnterFrame = function(){        

        dx = _xmouse - clip._x;

        dy = _ymouse - clip._y;

        clip._rotation = Math.atan2(dy, dx)*180/Math.PI;

    }

    stop();

}

hepi swishing


blog comments powered by Disqus