Hello Guys!!!
i need some help with getting my zoom function to display the percentage that has been zoomed in or out.
here is the code for the zoom function. this function works, all i want is help with how to display the zoom percent… like if its at 50%, or 120%, etc…
also how can get it to add some easing when it zooms, so that it gives a smooth zoom in & out effect, i’ve tried a few things, but didn’t work…
//zoom function
//this is percentage at which the mc loads on
var myScale:Number = 47;
//max zoom limit
var myScale_Limit_Top:Number = 200;
//min zoom limit
var myScale_Limit_Bot:Number = 10;
function zoom (action:String) : Void {
if (action == “in”) {
myScale += 10;
if (myScale > myScale_Limit_Top) {
myScale = myScale_Limit_Top;
}
} else if (action == “out”) {
myScale -= 10;
if (myScale < myScale_Limit_Bot) {
myScale = myScale_Limit_Bot;
}
}
big_map.dragging._xscale = myScale;
big_map.dragging._yscale = myScale;
}
//zoom_plus button
zoom_plus.onPress = function () {
map2._visible = false;
big_map._visible = true;
zones._visible = true;
zoom (“in”);
}
//zoom_minus button
zoom_minus.onRelease = function () {
zoom (“out”);
}
i would be very grateful if someone could help me…pleaseeeeeeeeeee
many thanks.
E