# Pixelfont: blurry issue. Math.round? And how?

**URL:** https://forum.kirupa.com/t/pixelfont-blurry-issue-math-round-and-how/220344
**Category:** flash
**Created:** [March 25, 2007, 12:41pm UTC](https://forum.kirupa.com/t/pixelfont-blurry-issue-math-round-and-how/220344 "2007-03-25T12:41:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xipe](https://avatars.discourse-cdn.com/v4/letter/x/a3d4f5/32.png) [@xipe](https://forum.kirupa.com/u/xipe)
#### Post date: [March 25, 2007, 12:41pm UTC](https://forum.kirupa.com/t/pixelfont-blurry-issue-math-round-and-how/220344/1 "2007-03-25T12:41:26Z")

</div>

[F4] Need help Math.rounding for pixelfont  
(Sorry, couldn’t edit the title of the posting…)

Dear Flash-guru’s,

I am making a flash portfolio for the jewelry that my wife creates.  
A test-page can be found on:  
[http://www.elin-sieraden.nl/test.html](http://www.elin-sieraden.nl/test.html)

My question is: when you onmouse-over to the right, all texts look crisp.  
But moving to the left, they look a bit ‘blurry’ when on place.

I have the idea that the x-pos isn’t rounded exactly. Searching the web, I came on the Math.round function.  
But to be honest, I haven’t got any idea where and how to implement this in my movie…  
I know it is very old AS. It is from the Stckman Barney menu fla.  
But anyway, I sincerely hope that you will be able to help me out.

The AS code is right under my message. I hope that this will provide you of enough information.

btw: the texts are in the boxes: box\_1 - box\_7.  
Thanks a lot!

xipe

…

```auto
box_x = 293;
box_y = 50;
box_number = 7;
line_y = getProperty("/line", _y);
in_menu = 1;
Box_RollBack = 0;
Speed_box = "1.4";
Speed_menu = 4;
Current_menu = 1;
Current_position = 0;
menu_width = 500;
menu_number = 7;
menu_totalwidth = menu_width * menu_number;
setProperty("/menu_1", _x, 0);
setProperty("/menu_1", _y, 0);
tolerance = 1;
for (counter = 1; box_number >= counter; counter = counter + 1)
{
        setProperty("box_" add counter, _x, (counter - 1) * menu_width + box_x);
        setProperty("box_" add counter, _y, box_y);
        set("box_" add counter add ":in_menu", 1);
} // end of for

```

```auto
if (eval("/:menu_rollback") eq 1)
{
        if (eval("/:menu_difference") < eval("/:tolerance") && eval("/:menu_difference") > -eval("/:tolerance"))
        {
                /:menu_rollback = 0;
                /:current_position = (eval("/:destination_menu") - 1) * eval("/:menu_width");
                for (counter = 1; eval("/:menu_number") >= counter; counter = counter + 1)
                {
                        setProperty("/menu_" add counter, _x, -eval("/:current_position") + (counter - 1) * eval("/:menu_width"));
                        setProperty("/menu_" add counter, _y, 0);
                } // end of for
                /:current_menu = eval("/:destination_menu");
        }
        else
        {
                /:current_position = eval("/:current_position") - eval("/:menu_difference") / eval("/:speed_menu");
                for (counter = 1; eval("/:menu_number") >= counter; counter = counter + 1)
                {
                        setProperty("/menu_" add counter, _x, -eval("/:current_position") + (counter - 1) * eval("/:menu_width"));
                        setProperty("/menu_" add counter, _y, 0);
                } // end of for
        } // end else if
        /:menu_difference = eval("/:menu_difference") - eval("/:menu_difference") / eval("/:speed_menu");
} // end if
if (eval("/:Box_RollBack") eq 1)
{
        for (counter = 1; eval("/:box_number") >= counter; counter = counter + 1)
        {
                if (eval("/box_" add counter add ":in_menu") eq 1)
                {
                        current_x = getProperty("/box_" add counter, _x) - (counter - 1) * eval("/:menu_width") - -eval("/:current_position");
                        box_difference = current_x - eval("/:box_x");
                        setProperty("/box_" add counter, _x, -eval("/:current_position") + (counter - 1) * eval("/:menu_width") + eval("/:box_x") + box_difference / eval("/:speed_box"));
                } // end if
        } // end of for
} // end if

```
