Question : Registration point with zooming

Hi there.

http://www.urbanpanic.com/test/map.html

I have created this map and you can scroll in all directions and zoom. The problem I am having is that when you zoom, it doesnt zoom to the centre of the window. Any idea's how I would go about this ? The map is a movie clip on the stage.

Any help would be greatly appreciated.

Answer : Registration point with zooming

move ur movie clip to the center of the stage and try transition class to do ur zooming for example if ur movieclip name is  map then do the following

import mx.transitions.*;
import mx.transitions.easing;

var t:TransitionManager = new TransitionManager(map);
t.startTransition({type:Zoom,direction:Transition.IN,duration:3,easing:None.easeNone,startPoint:5});

startPoint will zoom to the center

i am not sure about the start point refer to flash help  search for easing keyword and read zoom effect ....

or if u dont want to use the transition class then find center of the stage   by   Stage.width/2 and Stage.height/2 and then zoom it....


Random Solutions  
 
programming4us programming4us