Well, just looking at the code it should actually work.
The thing is, you are comparing a string with an array.
I don't know a thing about ActionScript, but even if it's an array of string with just one element as you specified in the .split call, shouldn't you refer to the first element with my_array[0]?
I don't really understand why you define another variable and you assign the array to it. Is this a tecnique to put the first element in the variable?
Remember that if arrays are considered "by reference" it looks to me like your function is trying to compare a string (char by char) with the first element's memory address.
But again, I'm not thinking like an ActionScript compiler, so...
Have you already tried this:
if (my_array[0] == allowlocation)
{ trace("IT WORKS!"); }
else
{ trace("YOU FAILED!"); }
Of course if you get it to work, you have to insert everything in a loop and modify it if you have an array of allowlocations.
Let us know what happens!