Dragging Multiple Objects (this is an easy one)

I have an extremely simple fla, that I wanted to add one thing to, but can’t get it to work right. There are 5 layers, each one has 1 key frame and that’s it.

  1. “Actions” Layer
startDrag("mask", true);
startDrag("bar", true);
stop();
  1. “Bar” Layer
Contains one movieclip of a 2px wide rectangle
height is twice that of the stage
movie clip's <instance name> is "bar"
  1. “Mask” Layer
Contains one movieclip of a rectangle twice the size of the stage
movie clip's <instance name> is "mask"
  1. “Before Image” Layer
Contains one image centered on the stage
It's the unedited before shot.
This layer is the only layer inside the above mask
  1. “After Image” Layer
Contains one image centered on the stage
It's the edited after shot.

It’s set up so when you move the mouse around, the mask follows it and reveals the image underneath. So you can slide back and forth to see the before and after of the edited and original image. It works fine, but I wanted to have a thin black bar also follow the cursor to emphasize where the before and after line is drawn.

When I looked for this in this forum (and google), all anyone is saying is to combine the objects into one movie clip and they’ll both follow the cursor at the same time. But I can’t do that, as one is a mask (invisible) and the other is a line to define the border of the mask (visible). So if I combine them it negates the point.

If you want to look at the file it’s here:
uploading.com/files/6a548e4f/example.fla (693 KB)
Made in Flash CS4
Flash Player 10
ActionScript 2

Thanks guys :slight_smile: