flash8 xml driven horizontal scrolling menu

hey guys i am a newbe and in a huge mess
i need help with a horizontal scrolling menu that is xml driven
can u give me any ideas how to go abt it.

i just found this code on net


xm = 0;
                                        //function to set                                         the xpos of the movieclip
                                        function xpos(bar_length,mul)
        {
        hpos = 0;
        scroll_length = 420;
        incr = bar_length/scroll_length;
        xm = _xmouse;
        if(_xmouse <= 10){xm = 10;}
        if(_xmouse >= 400){xm = 400;}
        scroll_x = hpos - xm;
        scroll_x = scroll_x * mul;
        x_pos = scroll_x * incr;
        x_pos = x_pos + hpos;
        return x_pos;
        }                                     _root.onEnterFrame                                         = function ()
        {
        // call function xpos
        x_pos = xpos(700,.20);
        with (bg)
        {
        _x += (x_pos - _x)*.4;
        }
        // call function xpos
        x_pos = xpos(950,.75);
        with (menu)
        {
        _x += (x_pos - _x)*.4;
        }
        }

[COLOR=#006600]

and here is the link to the site where i found this
[/COLOR]http://www.wildform.com/tutorials/scrolling_menu/

PLEASE help me under stand the xpos() function.