Click counter script not working

  1. my counting click script doesnt work. cant figure out why ((I’m not that good at if statements))

  2. why does my red box move along a diagonal and not more randomly?

  3. since my click counter script doesnt work, my dynamic text box loadMessage doesnt work?

i originally started this thought here:
http://www.kirupa.com/forum/showthread.php?t=84023&highlight=counting

this is my button script:
on (press){
filenamea = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
a = filenamea.length;
k = Math.floor(Math.random()*a); //creates random #

filenameB = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
b = filenameB.length;
m = Math.floor(Math.random()*b); //creates random #

this._x = km; //new x location
this._y = k
m; //new y location

var i = 0
i++
if (i==10)
{_root.loadMessage = “you’ve clicked 10 times, give it up”};

}

where as loadMessage is the variable name on a dynamic text box on the root.

please help