hello people. i hope you can help me with this…
im trying to make a interactive panning with the tutorial Interactive Image Panning, Page 1 but this swf loads in a main swf… the code i am using for the panning swf is
this.onMouseMove = function() {
constrainedMove(bg_mc, 8, 8);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 1) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else if (target._x>target.destX) {
target._x -= Math.ceil((target._x-target.destX)(speed/100));
} else if (target._x<target.destX) {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}
the problem im having is that the panning swf is using the with of the main swf that is holding it :S …
can someone please give me a clue of how can i modify it!!
thnx & regards design gurus!