13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Working with inverse kinematics<br />

var ikmover:IKMover = new IKMover(<strong>en</strong>djoint, pos);<br />

ikMover.limitByTime = true;<br />

ikMover.timeLimit = 1000;<br />

ikmover.addEv<strong>en</strong>tList<strong>en</strong>er(IKEv<strong>en</strong>t.TIME_LIMIT, timeLimitFunction);<br />

function timeLimitFunction(evt:IKEv<strong>en</strong>t):void<br />

{<br />

trace("timeLimit hit");<br />

trace("time is " + evt.time);<br />

trace("distance is " + evt.distance);<br />

trace("iterationCount is " + evt.iterationCount);<br />

trace("IKJoint is " + evt.joint.name);<br />

}<br />

Last updated 6/6/2012<br />

349

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!