Advanced Joystick is a class that creates a virtual joystick for Starling. Every frame it calculates the position of the stick and translate those values to velocityX
 and velocityY,Â
both as normalized values, meaning they are between -1 and 1.
It has a default skin for the stick and its holder, but it’s possible to replace them with custom graphics at runtime.
Sample
import starling.extensions.advancedjoystick.JoyStick; var myJoystick:Joystick = new Joystick(); myJoystick.setPosition(myJoystick.minOffsetX, clientHeight - myJoystick.minOffsetY); addChild(myJoystick); ... player.x += myJoystick.velocityX * maxSpeed; player.y += myJoystick.velocityY * maxSpeed;
Huyhung Kun liked this on Facebook.