# Simple mathquestion PLEASE HELP

**URL:** <https://forum.kirupa.com/t/simple-mathquestion-please-help/277974>\
**Category:** flash\
**Created:** [December 19, 2008, 3:07pm UTC](https://forum.kirupa.com/t/simple-mathquestion-please-help/277974 "2008-12-19T15:07:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliie](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@oliie](https://forum.kirupa.com/u/oliie)\
**Post date:** [December 19, 2008, 3:07pm UTC](https://forum.kirupa.com/t/simple-mathquestion-please-help/277974/1 "2008-12-19T15:07:44Z")

</div>

I have a slider that I want rounded to the closest 100 and it should start from 0 to 5000.

The code I’m using is the following:

> onMouseMove = function(){  
> updateAfterEvent();  
> }

var num:Number = 52.3;  
num /= 100;  
num = Math.round(num);  
num \*= 100;  
trace(num);

this.ratio=0 ;  
dragger.onPress=function(){  
this.startDrag(true,0,0,line.\_width,0);  
this.onEnterFrame=function(){  
ratio=Math.roundCOLOR=red \* 10000 / num[/COLOR];  
}  
}

the slider is 385px x-width which makes it even harder to get it to 5000  
385 \* 12,98701 = 5000

HALP!
