# Fade in/out quotes and xml line break PLZ HELP

**URL:** <https://forum.kirupa.com/t/fade-in-out-quotes-and-xml-line-break-plz-help/265522>\
**Category:** Uncategorized\
**Created:** [July 9, 2008, 8:35pm UTC](https://forum.kirupa.com/t/fade-in-out-quotes-and-xml-line-break-plz-help/265522 "2008-07-09T20:35:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jynx](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jynx](https://forum.kirupa.com/u/jynx)\
**Post date:** [July 9, 2008, 8:35pm UTC](https://forum.kirupa.com/t/fade-in-out-quotes-and-xml-line-break-plz-help/265522/1 "2008-07-09T20:35:45Z")

</div>

here’s the code i am using that i got froma tutorial:

```auto
var quote:Array = new Array();
var author:Array = new Array();
var totalQuotes:Number;
 
var rotateTimer:Timer = new Timer(15000, 0);
rotateTimer.addEventListener("timer", rotateQuote);
rotateTimer.start();
 
function init():void {
 var quotesXML:XML = new XML();
 quotesXML.ignoreWhitespace = true;
 quotesXML.textField.multiline = true;
 var XMLURL:URLRequest = new URLRequest("http://summitpcg.com/scripts/quotes.xml");
 var myLoader:URLLoader = new URLLoader(XMLURL);
 myLoader.addEventListener("complete", xmlLoaded);
 function xmlLoaded(event:Event):void {
  quotesXML = XML(myLoader.data);
  totalQuotes = quotesXML.quote.length();
  for (var i:int = 0; i < quotesXML.quote.length(); i++) {
   quote* = quotesXML.quote*.text;
   author* = quotesXML.quote*.author;
  }
  var initRandom:Number = randomNumber(0, totalQuotes);
  quoteMC.quote_txt.text = String(quote[initRandom]);
  authMC.author_txt.text = String(author[initRandom]);
 }
}
 
function rotateQuote(evt:TimerEvent) {
 quoteMC.quote_txt.text = "";
 authMC.author_txt.text = "";
 var randomness:Number = randomNumber(0, totalQuotes);
 quoteMC.quote_txt.text = quote[randomness];
 authMC.author_txt.text = author[randomness];
}
 
function randomNumber(low:Number, high:Number):Number {
 var low:Number = low;
 var high:Number = high;
 return Math.round(Math.random() * high - low) + low;
}
 
init();

```

how do i make these two dynamic text fields fade in and out?

also, i do not know how to do a line break in the xml file. i looked at 20 pages of google search and i got nothing. please help.

---

<div class="post-metadata">

**Author:** ![jynx](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jynx](https://forum.kirupa.com/u/jynx)\
**Post date:** [July 9, 2008, 11:07pm UTC](https://forum.kirupa.com/t/fade-in-out-quotes-and-xml-line-break-plz-help/265522/2 "2008-07-09T23:07:17Z")

</div>

the line break thing is not that simple my friend, i have tried it all, from /n to \<br\> to \<br /\> to weird characters, and I’ve searched everywhere. Seems like no one knows how to make a line break in xml. Also tried CDATA and that didnt work.

---

<div class="post-metadata">

**Author:** ![jynx](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jynx](https://forum.kirupa.com/u/jynx)\
**Post date:** [July 9, 2008, 11:08pm UTC](https://forum.kirupa.com/t/fade-in-out-quotes-and-xml-line-break-plz-help/265522/3 "2008-07-09T23:08:50Z")

</div>

Also, Im not that great with flash, so I would need a step by step on the fade thing. Can anyone point me in the right direction…? Sorry its only my 2nd week using flash
