Constraining Movement >function_move?

I have a split screen view with a large image above and a smaller image underneath.

There is a zoom window over the smaller image that when dragged around shows the larger image above it being moved at the same time (just that it’s bigger uptop)

[COLOR=Navy]**anyways I can’t seem to constrain the movement of the smaller movie clip … right now you can just click and drag it all over the place … and I’ll like for it to stay dragable only over top of the smaller image…

The name of the movie clip is … lilfigure**[/COLOR]

and here is the code in the root.

// The base_mag_factor is the correlation of the small picture to the big picture…
_root.base_mag_factor = 5;
// The mag_factor will change as scaling occurs
_root.mag_factor = _root.base_mag_factor;
//Stop so that this doesn’t reset willy-nilly on us
stop();

/*
This function scales the magnifying glass and the bigpicture
It also helps to handle the centering effect on the zoom…
Read the comments on how that happens
*/
function scale_mag (zoom_perc,mag_perc) {

// getting ready for later...to be able to center
start_width = _root.mag._width;
start_height = _root.mag._height;
//scale it all...
_root.figure._xscale = (zoom_perc);
_root.figure._yscale = (zoom_perc);
_root.mag._xscale = (mag_perc);
_root.mag._yscale = (mag_perc);
_root.mag_factor = (zoom_perc/100)*(_root.base_mag_factor);
_root.zoom_ind = zoom_perc; //updates the percentage viewer
// The other half keeps scaling in sync and centers the scaling
// Find out the width and height now
end_width = _root.mag._width;
end_height = _root.mag._height;
// Figure the difference in width and height (x and y)
x_change = start_width - end_width;
y_change = start_height - end_height;
//adjust by half the difference
_root.mag._x = _root.mag._x + x_change/2;
_root.mag._y = _root.mag._y + y_change/2;

}

/*
Moves the panel inside the viewing window…
It moves opposite the magnifying glass.
This function is also called when scaling occurs
/
function move_panel () {
//trace (_root.mag_factor);
_root.figure._x = 0 -((_root.mag._x-_root.lilfigure._x)
_root.mag_factor);
_root.figure._y = 0 -((_root.mag._y-_root.lilfigure._y)*_root.mag_factor);
}

Thanks in advance.

Cheers