# Showing the zoom percentage

**URL:** <https://forum.kirupa.com/t/showing-the-zoom-percentage/182322>\
**Category:** Uncategorized\
**Created:** [March 17, 2006, 4:21am UTC](https://forum.kirupa.com/t/showing-the-zoom-percentage/182322 "2006-03-17T04:21:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![e\_k](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@e\_k](https://forum.kirupa.com/u/e_k)\
**Post date:** [March 17, 2006, 4:21am UTC](https://forum.kirupa.com/t/showing-the-zoom-percentage/182322/1 "2006-03-17T04:21:26Z")

</div>

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
