Try using this prototype function:
String.prototype.replace = function(str, newStr) {
var s = this;
var i = s.indexOf(str, 0);
newStr = ((eval(newStr) == undefined) ? newStr : ((typeof (eval(newStr)) ==
"function") ? eval(newStr)() : eval(newStr)));
if (i < 0) {
return this;
}
return s.split("").splice(0, i).join("") + newStr + s.split("").splice(i +
str.length, s.length - str.length).join("").replace(str, newStr);
};
TO be used like this:
myvar = "<i>Hello</i> <b>World</b> <i>is</i> a <b>standard</b> <i>text</i>";
trace(myvar);
myvar = myvar.replace("> <","> <");
trace(myvar);
txt.htmlText = myvar;
John
--
----------------------------------------------------------------------------
-----------------------------------------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------------------------------------
TUTORIALS
Flash & PHP Emailform:
http://home.hccnet.nl/john.mulder/flash/tutorials/flash_php_mailform.zip
----------------------------------------------------------------------------
-----------------------------------------
[quoted text, click to view] "Frank Thorstens" <FrankThorstens@gmx.de> wrote in message
news:briipi$3pij2$1@ID-202045.news.uni-berlin.de...
> Hi,
>
> Is there any solution known to the problem that in html textfields spaces
> between html tags get lost?
>
> <i>Hello</i> <b>World</b>
>
> results in: HelloWorld.
>
> I generate the texts automically so i cannot easily insert   oder not.
> if a would insert nsbp after every tag then sometimes there would appears
> two spaces :-/
>
> Who can help me?
>
> bye,
> Frank
>
>