PDA

View Full Version : Zoom trouble


vicci
05-10-2004, 06:23 AM
Hi people ,

I have some trouble about a zoom. I wanna create a zoom on a map .

What i need is :
-the map become bigger and the area where i cliked become the new center of my map. But i dont want the zoom to be too fast, so i need to control it and i dunno how.

So i started my zoom and i have test many things but i didnt find >_<
Here is my .fla.

fla: zoom_vicci.rar (http://195.83.128.55/~src2e07/zoom_vicci.rar)

thanks a lot for your help !

vicci
05-10-2004, 09:39 AM
the as must be something like that :

onClipEvent (mouseUp) {
myX = _xmouse;
myY = _ymouse;
}
onClipEvent(mouseUp){
_root.mc._xscale=_root.mc.xscale+100;
_root.mc._yscale=_root.mc.yscale+100;

}
then something which tell that i take the _xmouse and _ymouse properties to center my mc, it is a setproperty but my as is wrong ....

binkyboo
05-10-2004, 11:16 AM
Here's an example you can play around with. I'm currently altering the code to make it more processor friendly but this should help you get started.

vicci
05-10-2004, 11:45 AM
ok thanks a lot binkyboo, I have read your script, it is good script and it will help me to start. But the action i wanna create is a little different:

Indeed, in your example, you create a zoom of the map , then you drag it thanks to the button to scroll.
But i want to create the zoom directly by clicking on the map. So the zoom will depend of the area where i clicked and iam looking for that script.

So i can make the map bigger but i dunno how to tell that the area i want to be bigger is the area where i cliked >_< .

binkyboo
05-10-2004, 11:58 AM
This thread should help!

http://www.actionscript.org/forums/showthread.php3?t=31946&highlight=center+map

vicci
05-11-2004, 05:07 AM
ok thanks i have find the solution of my pb ^___^

binkyboo
05-11-2004, 09:07 AM
Would you post the code to your solution?