how to give elastic effect to image?
<p>I have an pipe image and it should behave like an elastic. That is when i touch the pipe at corner it should blend and when i release the pipe it should behave like elastic stick(ie it should move front and back). I have tried in cocos2d with box2d but i cant do it like this.</p>

<p>whether this code works fine for elastic joint. here below i have given code.</p>

<pre><code>var jointDef:b2DistanceJointDef = new b2DistanceJointDef();
jointDef.Initialize(body1, body2, body1.GetPosition(), body1.GetPosition());
jointDef.frequencyHz = 1.5;
jointDef.dampingRatio = 1;
var joint:b2DistanceJoint = m_world.CreateJoint(jointDef) as b2DistanceJoint;
</code></pre>

<p>Please help me its very urgent.</p>
