title: How to solve TypeError: Error #1009: Cannot access a property or method of a null object reference while calling swf from flex 3
body: <p>I'm new to flash . I have called this flash code in Flex using SWF loader .I got the following Error. Here I've attached flash coding for header_text_fla Kindly do the needful.</p>
  
  <blockquote>
    <p>TypeError: Error #1009: Cannot access a property or method of a null
    object reference. at header_text_fla::MainTimeline/loaderComplete()</p>
  </blockquote>
  
  <pre><code>var myEvent:Event;
  var myParams:LoaderInfo;
  function loaderComplete(myEvent:Event)
  {
  if(this.loaderInfo.parameters.text1 != null)
  {
  Text1.text=this.loaderInfo.parameters.text1 as String;
  }
  if(this.loaderInfo.parameters.text2 != null)
  {
  Text2.text=this.loaderInfo.parameters.text2 as String;
  }
  if(this.loaderInfo.parameters.text3 != null)
  {
  Text3.text=this.loaderInfo.parameters.text3 as String;
  }
  }
  
  function useParams()
  {
  
  }
  
  var myLoaderInfo=new Object();
  myLoaderInfo.myParamsLoaded=false;
  myLoaderInfo.loaderComplete=loaderComplete;
  myLoaderInfo.useParams=useParams;
  
  this.loaderInfo.addEventListener(Event.COMPLETE, myLoaderInfo.loaderComplete );
  </code></pre>