Fiddled around with various things and still comes up with %20 in the space.
I've attached a zip folder with the fla. and text file- I just slimmed it down to the one variable. I would be great if you had a chance take a look to see what I'm doing wrong. If not, thanks anyway for all your help on this.