title: AS3 - Pass Array from Custom Class To Main.as
body: <p>I'm trying to get my array from a custom class so I can use on my main.as file.</p>
  
  <p>Here is what I'm working with.</p>
  
  <p>Main.as:</p>
  
  <pre><code>function searchPrize(e:MouseEvent):void
  {
      var searched_number:Pcnsearch = new Pcnsearch();
      searched_number.searchNum(pcn.text,'fueltest',this.stage);
  
      // trying to get the array "CReturn from custom class to trace out
      var number_arr:Array = new Array(searched_number.returnSearch());
      trace(number_arr.fName);
  }
  </code></pre>
  
  <p>Custom Class: (snippet)</p>
  
  <pre><code>public var cReturn:Array = new Array();
  
  public function loader_completed(e:Event)
  {
      var person:URLVariables = new URLVariables(e.target.data);
      this.cReturn.pcn = person.one;
      this.cReturn.fName = person.five;
      this.cReturn.lName = person.six;
  }
  
  
  public function returnSearch()
  {
      return cReturn;
  }
  </code></pre>
  
  <p>what am I doing wrong that is causing me to not return the array into my main.as file?</p>
  
  <p>any help would be great,
  Thanks,</p>