title: 1180: Call to a possibly undefined method loaderInfo action script error
body: <p>I am a newbie in flash. I want to test passing variables to swf file using flashvars, then I had been creating a action script file with name <code>"test_adver.as"</code>. I use this file in the fla file as class document. This is the code of <code>"test_adver.as"</code>:</p>
  
  <pre><code>package src{
  import flash.display.Loader;
  import flash.display.LoaderInfo;
  import flash.display.MovieClip;
  import flash.events.Event;
  import flash.external.ExternalInterface;
  import flash.net.URLRequest;
  import flash.text.TextField;
  
  public class test_adver extends MovieClip {
      public function test_adver() {
          try {
              var param:Object=loaderInfo(this.root.loaderInfo).parameters;
          } catch (error:Error) {
              trace("Loading failed");
          }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>But when I run the code, the output displays <code>"1180: Call to a possibly undefined method loaderInfo action script error"</code>. I try debug an hours but cannot fix this issue. help me. Please! Sorry my English is not good.</p>