Hey guys, can anyone please help me with my problem? I am at the point of pulling my hair out, so please someone out there spare me!!!
I have an image that is bigger than the stage which contains many thumbnails...I use TweenLite (props to you) for doing a panning effect...everything works like a charm...
My problem is that I don't want the image to pan directly to my x,y destination, I want it to move to about a quarter of the total distance....
Here is the link of what i'm talking about...
http://
http://www.prada.com/pradabook/
Once you click on a thumbnail and it zooms, move the mouse left or right and notice that it only moves a certain distance...it doesn't move to the mouse pointer exactly, is just moves a fraction of the distance....THIS IS WERE I'M HAVING PROBLEMS!!! How is this done???
I use the following code to pan the image...
var stageWidthB = Stage.width;
var imageWidthB = mc2._width;
var outSideStageXB = imageWidthB - stageWidthB;
var calculationXB = stageWidthB / outSideStageXB;
var moveToPositionXB;
var stageHeightB = Stage.height;
var imageHeightB = mc2._height;
var outSideStageYB = imageHeightB - stageHeightB;
var calculationYB = stageHeightB / outSideStageYB;
var moveToPositionYB;
mc2.onEnterFrame = function()
{
moveToPositionXB = Math.floor(_xmouse / calculationXB);
moveToPositionYB = Math.floor(_ymouse / calculationYB);
TweenLite.to(mc2,80,{_x:-moveToPositionXB, _y:-moveToPositionYB});
};
mc2 is the name of the movie that holds all the images...
Please guys, any help would be much appreciated!!!