Help with functions and random direction

Hey all. Need help with my functions in this fla i have. I use the function to create a random number and the char move accordingly depending on the number.

heres the fla