click here to download a cool drag and drop using as3 and greensock source code ================================================================= import com.greensock.*; import com.greensock.easing.*; createEvents(); function createEvents():void { for (var i:Number=1; i<4; i++) { this["drag"+i].__x=this["drag"+i].x; this["drag"+i].__y=this["drag"+i].y; this["drag"+i].answer=String("drop"+i); this["drag"+i].index=1; this["drag"+i].buttonMode=true; this["drag" + i].addEventListener(MouseEvent.MOUSE_DOWN,dragIcon); this["drag" + i].addEventListener(MouseEvent.MOUSE_UP,dropIcon); } } function dragIcon(m:MouseEvent):void { swap(MovieClip(m.currentTarget)); MovieClip(m.currentTarget).startDrag(); } function tweenback(__target) { __target.stopDrag(); TweenLite.to(__target, 0.5, {x:__target.__x, y:__target.__y, ease:Cubic.easeOut,onComplete:res...
all about coding especially in javascript, daily used algorithms, react, angular and other gaming stuffs like webgl, pixijs, three.js and cocos2dx running code sample especially in javascript and c++.