Moving & Tweening AS 2.0 style

Hello there,

I’m trying to replicate a nice sliding effect I’ve found on a website, I’ve tried to use only Actionscript 2.0 OOP. From the OOP point of view I think I suceeded but the effect isn’t there yet.

To have an idea what I’d like to do:

To get what I’ve done so far:

The effect in itself is very simple.
There is a series of rectangles (lines would do as well):


When you rollOver a rectangle this rectangle expands, and all the other rectangles just keep fixed on the first rectangle edges:


onRollOut everything comes back to its initial state:


So far so good.

Now, in some particular case you’ll end up by having the whole set of rectangles moved from the initial position, try to understand this diagram:

      +----+----+----+----+                      (init)
     +----+-------+----+----+                    (n.2)
        +----+----+-------+----+                 (n.3)
               +----+----+-------+----+          (n.4)
                     +----+----+----+-------+    (n.5)
      +----+----+----+----+                      (no Hover)

Well, what I’d like it to do is just go back when I’m not hovering anything. But it is a bit complicated considering that I want a white space between images.

Check my example it’ll be clearer:

As you can see it all works with some crazy things happening in the background.

PLEEEEEEEEEASE, help me debuggin this algorithm!