Search code examples
actionscript-3flash-cs4

Keyboard Control on characters made with Adobe CS4 Bone Tool?


Is there any way to control a character made with Adobe CS4 Bone Tool via keyboard buttons? Its limbs are linked up by IK chains built by Bone Tool.


Solution

  • import fl.ik.*;

    use

    IKArmature IKBone IKJoint IKMover

    
    addEventListener(keyboardEvent.KEY_DOWN, keyDownHandler);
    
    function keyDownHandler(event:Event){
    
        if (event.keyCode == Keyboard.UP)
        {
          // do your magic with IKMover moveTo() method
        }
    
    }