Hey Flashers,
I recently stumbled on this adidas site (via k10k.net). If you go into products and select any product, there’s a large view of the product and a small view. The small view has a navigation box over it which allows you to move it over the product and move the large view to that point.
I’m trying to replicate similar functionality. I figured it’s a matter of enclosing the x and y change in a startDrag function. I’ve gotten things to move a little, but nothing close to the adidas example:
var currX:Number = eye_clip._x;
var currY:Number = eye_clip._y;
var xLimit:Number = 0;
var yLimit:Number = 0;
controller.wayfinder.onPress = function() {
startDrag(this, true, 305, 10, 5, 82);
for (i=0; i<10; i++) {
if (wayfinder._x>=82 && eye_clip._x != 0) {
eye_clip._x -= currX;
} else if (wayfinder._x<=82 && eye_clip._x != 0) {
eye_clip._x += currX;
}
if (wayfinder._y>=5 && eye_clip._y != 0) {
eye_clip._y -= currY;
} else if (wayfinder._y<=5 && eye_clip._y != 0) {
eye_clip._y += currY;
}
}
};
controller.wayfinder.onRelease = function() {
stopDrag();
};
How can I control the large movie clip (eye_clip) in this example, with the smaller clip called wayfinder? Do I have to map the width and height aspects of one clip to the other? How would I do that?