Skip to main content
Inspiring
October 6, 2008
Answered

Need help Loading parsed RSS text

  • October 6, 2008
  • 1 reply
  • 362 views
Hi, I have created an AS3 FLA where I am parsing and displaying RSS text. I have traced the parsed text and displayed the text into dynamic text boxes on the stage no problem.
However the line breaks in the traced text show up on stage as well.
How does one strip out the <p> or </r> tags from the text to make the text one nice long line that will wrap using the length of the text box as it's parameters?
This topic has been closed for replies.
Correct answer GumpsterF
OK, I have found the answer, thanks all.

var myvar:String = myDynamicText.text;
myDynamicText.text = myvar.split("\r").join(" ");
myDynamicText.text = myDynamicText.text.split("\n").join(" ");

1 reply

GumpsterFAuthor
Inspiring
October 6, 2008
OK, I found some code that works but only for the first instance of the ' /r '. How do I make this code seach out all the text in the box and strip out all the /r's?

GumpsterFAuthorCorrect answer
Inspiring
October 7, 2008
OK, I have found the answer, thanks all.

var myvar:String = myDynamicText.text;
myDynamicText.text = myvar.split("\r").join(" ");
myDynamicText.text = myDynamicText.text.split("\n").join(" ");