# Slinky Effect in Actionscript

**URL:** <https://forum.kirupa.com/t/slinky-effect-in-actionscript/237243>\
**Category:** flash\
**Created:** [August 28, 2007, 1:49pm UTC](https://forum.kirupa.com/t/slinky-effect-in-actionscript/237243 "2007-08-28T13:49:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![biscuit](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biscuit](https://forum.kirupa.com/u/biscuit)\
**Post date:** [August 28, 2007, 1:49pm UTC](https://forum.kirupa.com/t/slinky-effect-in-actionscript/237243/1 "2007-08-28T13:49:22Z")

</div>

Hi there,

I’m trying to simulate the effect of a slinky spring in actionscript, and I’ve come up against an interesting anomaly.

The code is fairly basic, and takes advantage of a certain degree of latency in the running of the code. The code basically asks all the movie clips to the right of clip that is being dragged, to keep a certain amount of pixels apart from its neighbour. You would think that this would mean the clips would be kept in rigid alignment, but instead you get a great rippling effect.

My problem is that this only seems to work in one direction despite my code being identical (but reversed)for each different case - left and right.

If you take a look at the fla you’ll see what I mean. Try dragging line No. 0 around versus dragging line No. 19.

Any help would be greatly appreciated, or if you know of another way of achieving this that would be great too.

Thanks!
