At first I thought no, but maybe you do.
Here's some code I used for zooming

var oldScale:Number; // initial scale of the _dpoToZoom                         
var newScale:Number; // target scale of the _dpoToZoom  
var scaleFactor:Number = newScale/oldScale;
var globalMouse:Point = new Point(stage.mouseX, stage.mouseY);
var localMouse:Point = _dpoToZoom.parent.globalToLocal(globalMouse);
var deltaX:Number = localMouse.x - _dpoToZoom.x;
var deltaY:Number = localMouse.y - _dpoToZoom.y;
var newX:Number = Math.round((localMouse.x - (deltaX * scaleFactor)));
var newY:Number = Math.round((localMouse.y - (deltaY * scaleFactor)));
TweenLite.to(_dpoToZoom, _tweenDuration, {
                        scaleX:_currentScale, 
                        scaleY:_currentScale,
                        x:newX,
                        y:newY,
                        ease:Cubic.easeOut,
                        });

HTH
Willem van den Goorbergh

On 27 dec 2011, at 15:19, natalia Vikhtinskaya wrote:

> Thank you. Should I convert local x.y to Global x,y for clicked mc?
> 
> 27 декабря 2011 г. 17:02 пользователь Geografiek
> <[email protected]> написал:
>> Hi Natalia,
>> Yes I think that's the general idea. The math is really not that hard.
>> just scaling (always the same) and moving (relative to the position of the 
>> picture clicked)
>> Grab paper and pencil and visualize what you want to achieve to get your 
>> calculations started. It really helps.
>> success
>> Willem van den Goorbergh
>> 
>> On 27 dec 2011, at 13:08, natalia Vikhtinskaya wrote:
>> 
>>> Hi
>>> I want to create image grid with zoom effect similar to this
>>> http://www.zara.com/webapp/wcs/stores/servlet/category/us/en/zara-us-W2011-s/149501/
>>> Click on "event". I need an advice how to place
>>> 
>>> If  I create a grid inside one mainMc how I can manage it? I need to
>>> zoom this mainMc, move all images but clicked image must be in the
>>> centre of the screen. Is this correct idea in general? How to make
>>> calculation? What is the way to solve it?
>>> 
>>> Thank you for any help.
>>> 
>>> _______________________________________________
>>> Flashcoders mailing list
>>> [email protected]
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> 
>> 
>> 
>> 
>> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>> Geografiek is een in Utrecht gevestigd kartografisch bureau
>> Willem van den Goorbergh is telefonisch bereikbaar onder nummer 030-2719512
>> of mobiel: 06-26372378
>> postadres: Hooghiemstraplein 89 3514 AX UTRECHT
>> Bezoek onze website op: www.geografiek.nl
>> twitter: @wvdgoorbergh
>> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell 
phone: (+31)6-26372378
visiting address: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=





_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to