title: AS3 duplicate dynamic text
body: <p>Trying to find out how could i duplicate this function! So i have a code fetching simple text data from xml file named text1.xml. On my stage there is scrolling text wich tells site info but i need another scrooling text with little smaller font placed just above first on that tells something different, so would i need another xml file with text in it like text2.xml?. How to upgrade this, here is the code:</p>
  
  <pre><code>//SCROLLING SPEED
  var scrolling_speed:int = 7;
  //TEXT TO SCROLL
  var text_to_scroll:String = "Main site info like:www.mysite.com";
  
  var xmlLoader: URLLoader = new URLLoader();
  var myData: XML;
  var myItems: XMLList;
  var position: uint;
  xmlLoader.addEventListener(Event.COMPLETE, onComplete);
  xmlLoader.load(new URLRequest("text1.xml"));
  
  function onComplete(e : Event): void{
      myData = new XML(URLLoader(e.currentTarget).data);
      myItems = myData..item;
  }
  
  
  //establish the field
  var my_text:TextField = new TextField();
  //add the field to stage
  addChild(my_text);
  //set the text
  my_text.text = text_to_scroll;
  //set the x coord off right side of stage
  my_text.x = stage.stageWidth;
  //set y coord in middle of stage (about)
  my_text.y = (stage.stageHeight/1)-(my_text.height/2.5);
  //not selectable
  my_text.selectable = false;
  //no border
  my_text.border = false;
  //field scales with more text
  my_text.autoSize = TextFieldAutoSize.LEFT;
  
  //set a format
  var my_text_format:TextFormat = new TextFormat();
  //set the color to the hex
  my_text_format.color = 0x000000;
  //set the font size
  my_text_format.size = 28;
  //set the font face
  my_text_format.font = "Futura Md BT";
  //apply formatting
  my_text.defaultTextFormat = my_text_format;
  my_text.setTextFormat(my_text_format);
  
  //add the listener to scroll
  my_text.addEventListener(Event.ENTER_FRAME,move_text);
  
  //scroll function
  function move_text(myevent:Event):void {
      my_text.x-=scrolling_speed;
      if(my_text.x&lt;-my_text.width){
          my_text.x=stage.stageWidth;
          //Set next text
          if(++position &gt;= myItems.length()){
              position = 0;
          }
          my_text.text = myItems[position];
      }
  }
  </code></pre>
  
  <p>And the xml(text1) file for text look like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;data&gt;
  
      &lt;news&gt;
          &lt;item&gt;&lt;![CDATA[Text for news 1]]&gt;&lt;/item&gt;
          &lt;item&gt;&lt;![CDATA[Text for news 2]]&gt;&lt;/item&gt;
          &lt;item&gt;&lt;![CDATA[Text for news 3]]&gt;&lt;/item&gt;
          &lt;item&gt;&lt;![CDATA[Text for news 4]]&gt;&lt;/item&gt;
          &lt;item&gt;&lt;![CDATA[Text for news 5]]&gt;&lt;/item&gt;
          &lt;item&gt;&lt;![CDATA[Text for news 6]]&gt;&lt;/item&gt;
      &lt;/news&gt;
  &lt;/data&gt;
  </code></pre>