title: How do I access flashvars in AS3, and add them to an existing text field?
body: <p>Edit: I've come to realize the main problem I'm facing is that I want a text field that already exists in a movieclip or on the stage to take the string from a flashvar. For some reason it will not do that. How do I make a pre-existing text field change to match the flashvar text?</p>
  
  <p>Html:</p>
  
  <pre><code>&lt;div id="flashContent"&gt;
              &lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="29px" id="egnewsTicker" align="middle"&gt;
                  &lt;param name="movie" value="egnewsTicker.swf" /&gt;
                  &lt;param name="flashvars" value="newslisttest=this is my test" /&gt;
                  &lt;param name="quality" value="high" /&gt;
                  &lt;param name="bgcolor" value="#ffffff" /&gt;
                  &lt;param name="play" value="true" /&gt;
                  &lt;param name="loop" value="true" /&gt;
                  &lt;param name="wmode" value="transparent" /&gt;
                  &lt;param name="scale" value="showall" /&gt;
                  &lt;param name="menu" value="false" /&gt;
                  &lt;param name="devicefont" value="false" /&gt;
                  &lt;param name="salign" value="lt" /&gt;
                  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;
                  &lt;!--[if !IE]&gt;--&gt;
                  &lt;object type="application/x-shockwave-flash" data="egnewsTicker.swf" width="100%" height="29px"&gt;
                      &lt;param name="movie" value="egnewsTicker.swf" /&gt;
                      &lt;param name="quality" value="high" /&gt;
                      &lt;param name="bgcolor" value="#ffffff" /&gt;
                      &lt;param name="play" value="true" /&gt;
                      &lt;param name="loop" value="true" /&gt;
                      &lt;param name="wmode" value="transparent" /&gt;
                      &lt;param name="scale" value="showall" /&gt;
                      &lt;param name="menu" value="false" /&gt;
                      &lt;param name="devicefont" value="false" /&gt;
                      &lt;param name="salign" value="lt" /&gt;
                      &lt;param name="allowScriptAccess" value="sameDomain" /&gt;
                      &lt;param name="flashvars" value="newslisttest=this is my test" /&gt;
                  &lt;!--&lt;![endif]--&gt;
                      &lt;a href="http://www.adobe.com/go/getflash"&gt;
                          &lt;img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /&gt;
                      &lt;/a&gt;
                  &lt;!--[if !IE]&gt;--&gt;
                  &lt;/object&gt;
                  &lt;!--&lt;![endif]--&gt;
              &lt;/object&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>I know this is supposed to be a simple task, and I have found several web articles that give examples, but I simply cannot make it work when I'm trying to do my own code. All I want to do is pass a flashvar string and be able to access it by name in flash using AS3, but I can't seem to accomplish that.</p>
  
  <p>I'm trying:</p>
  
  <pre><code>var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
  newsItem.newsHeadline.text = String(paramObj[varName]);
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>newsItem.newsHeadline.text = this.loaderInfo.parameters.newslisttest;
  </code></pre>
  
  <p>Nothing I try works, it always just stays blank. What is the trick to accessing flashvars in flash as3? I'm just not getting it and I can't find a good explanation anywhere...</p>