When you have time, is there anyway you could provide a quick example file with how it corresponds to creating movement or controlling movement of another object? I was having a hard time finding documentation to do this. I get how drag and drop works to click and hold an object to move it. What I was not getting, or how to make it possible, was how to drag an object, such as a joystick or squares in your link, to make another object, like the player, move in the corresponding direction?
I'll admit that there may very well be an easier way, but not one that i understand at this moment. I wanted two joysticks, one to control movement and one to control player rotation. I wanted the joystick to disappear when not in use. I also wanted them to adjust to where the player places their finger on the screen. I didn't want the joysticks to stay in a static position on the screen.
Edit: To better explain my dilemma from your example, all I'm seeing is two squares with drag and drop behaviors attached to them. How does clicking and dragging correspond to measurement movement to make another object move in a specific direction.
DO NOT MAKE Problem Complex!!!!!!!!!!!!!!!!!!!!
http://www.mediafire.com/download/r5nb8 ... idemo.capx
HERE IS A DEMO MADE BY 1 MIN
THIS IS A SUPER EASY JOB
Please do not put any problems complicate
this is my game
[attachment=0:eb3ispu9]sendhelp3.png[/attachment:eb3ispu9]
var nowthis = this ;
nowthis.addEventListener(Event.ENTER_FRAME,RotationEvent);
function RotationEvent(me:Event):void{
var TmpA : Point = new Point(nowthis['TestObj'].x,nowthis['TestObj'].y);
var TmpB : Point = new Point(nowthis.mouseX,nowthis.mouseY);
nowthis['TestObj'].rotation = PointRotation(TmpA,TmpB);
}
function PointRotation(PointA,PointB) {
var Pa = new Point(PointA.x,PointA.y);
var Pb = new Point(PointB.x,PointB.y);
var Dx = Pb.x - Pa.x;
var Dy = Pb.y - Pa.y;
var DRoation = Math.atan2(Dy,Dx);
var WRotation = DRoation/Math.PI*180;
return WRotation;
}