Need to set Boundaries for Slingshot

Hello, I am using the slingshot I downloadedd from the sample Bunny ears template with slingshot.

I have an issue with my slingshot, when I pull to the right or up, it will stop at any point I choose, but when I pull to the left or down, it will pull forever, even going offscreen.

I need to make a stop point where you can pull any direction and it will be equal and stop at any point

Here is my code for what I am refering to:

[code]

– If the projectile is in the top left position
if(t.x < 105 and t.y < _H - 165)then
myLineBack = display.newLine(t.x - 30, t.y, 455, _H - 125);
myLine = display.newLine(t.x - 30, t.y, 375, _H - 125);
– If the projectile is in the top right position
elseif(t.x > 105 and t.y < _H - 125)then
myLineBack = display.newLine(t.x + 10, t.y - 25, 455, _H - 125);
myLine = display.newLine(t.x + 10, t.y - 25, 375, _H - 125);
– If the projectile is in the bottom left position
elseif(t.x < 105 and t.y > _H - 125)then
myLineBack = display.newLine(t.x - 25, t.y + 20, 455, _H - 125);
myLine = display.newLine(t.x - 25, t.y + 20, 375, _H - 125);
– If the projectile is in the bottom right position
elseif(t.x > 105 and t.y > _H - 125)then
myLineBack = display.newLine(t.x - 15, t.y + 30, 455, _H - 125);
myLine = display.newLine(t.x - 15, t.y + 30, 375, _H - 125);
else
– Default position (just in case).
myLineBack = display.newLine(t.x - 25, t.y, 420, _H - 125);
myLine = display.newLine(t.x - 25, t.y, 375, _H - 125);
end

– Set the elastic band’s visual attributes
myLineBack:setColor(20,51,51);
myLineBack.width = 12;

myLine:setColor(20,51,51);
myLine.width = 12;

– Insert the components of the catapult into a group.
slingshot_container:insert(sling);
slingshot_container:insert(myLineBack);
slingshot_container:insert(t);
slingshot_container:insert(myLine);
slingshot_container:insert(sling);

– Boundary for the projectile when grabbed
local bounds = e.target.stageBounds;
bounds.xMax = 400;
bounds.xMin = 300
bounds.yMax = _H - 250;
bounds.yMin = 300;

if (e.x < bounds.xMin or e.x > bounds.xMax)

then t.x = e.x;

end
if(e.y > bounds.yMax) then
t.y = e.y;
else

end

if(e.x < bounds.xMax) then
t.x = e.x;
else
– Do nothing
end
[/code] [import]uid: 53355 topic_id: 13415 reply_id: 313415[/import]