I'm working on a flash application for viewing a map (related to a game) and in order to "zoom in" on the map, I'm basically stretching the yscale and xscale, but when I do this (as you can imagine), the place I'm viewing on the map changes completely. I figure there has to be a way to avoid this, but how is beyond me...
Any hints?
My code for zooming:
onClipEvent(load){
lastCheck = 0;
}
onClipEvent(enterFrame){
if(lastCheck != this.value){
//Stretch the image to zoom it!
_root.imageLoader._yscale = 100+this.value;
_root.imageLoader._xscale = 100+this.value;
lastCheck = this.value;
}
}
This is actionscript 2.0.
I figure the x and y of the imageLoader need to be moved, but I don't know how to put it into a formula that'll keep it at its precise point.
You can see my current version in action here:
http://tibialottery....tml?names=false
Yours,
Shane~
This post has been edited by ShaneK: 29 April 2010 - 07:04 AM

New Topic/Question
Reply



MultiQuote




|