I have a text box created with the text tool and I need it to
change any spaces typed into it into the universal space code, %20.
It would be best if the spaces could be changed instantly as they
were typed, but it will also be acceptable if they are changed on a
Please provide a snippet of ActionScript that will accomplish
this and tell where I should put it (i.e. on text box, on button,
I think this won't work after the first replacement, because
%20 are 3 letters, so indexVar should be increased by 3 when a
space was replaced. Besides that, the text can't be edited.
Maybe this might be better: