HI, I have container movieclip and one mask layer with the height and width of the current screen. The continer is always bigger than the mask clip. so i need to zoom the container at the center of the mask clip. something link in MicroSoft XL zoom controller at the bottom right
.
Does any once have the equation or any other demo links? Thanks in advance!!!
EDIT 1
private function slider (event:Event) {
//event.target.value = 0 to 1
// possible values are 0, 0.1, 0.2, 0.3, ... 0.9, 1
// mcMask.x = mcMask.x = 0;
// mcMask.width = stage.StageWidth, mcMask.height = stage.StageHeight
// mcContainer.x and mcContainer.y may vary .. its greater than the mcMask clip.
// So its need to be drag on the mask clip. I have placed a lots of images in the container something like map.
// If the slider changes the values then the map(mcContainer) need to zoom to scale came from 'event.target.value'.
// i want to zoom the mcContainer inside the mask, not the mouse cliked point, I want the current center
// posistion of the container with resepect to the mask clip.
mcContainer.scaleX = mcContainer.scaleY = (event.target.value);
mcContainer.x = (mcMask.width - mcContainer.width)/2;
mcContainer.y = (mcMask.height - mcContainer.height)/2;
// I tried this but if i drag this mcContainer to the left or right it should not locate the center point.
}
any hope??? :(
EDIT 2
The Source Code: http://www.4shared.com/file/08X5mG99/AS3_Zooming.html