title: Arrays in AS3.0 OOP
body: <p>I'm trying to figure out how to work with arrays in OOP AS3.0. Have been looking for the answers or some tutorial and can't find it. Maybe you can explain.</p>
  
  <p>This is what I've got:</p>
  
  <p>Gallery.as file:</p>
  
  <pre><code>package  {
  
      import flash.display.MovieClip;
  
  
      public class Gallery extends MovieClip {
  
          public var can:Number;
  
          public function Gallery() {
  
  
              can = 10;
  
              var impMyClass:Read = new Read(can);
              trace (impMyClass.myArray[0]);
  
          }
  
  }
  
  }
  </code></pre>
  
  <p>and here's Read.as file:</p>
  
  <pre><code>package  {
  
      import flash.display.MovieClip;
  
  
      public class Read extends MovieClip {
  
          public var rezalt:Number = new Number;
          public var myArray:Array = new Array;
  
          public function Read(can:Number) {
  
              rezalt = can * 10 - 50 / 10;
              trace('Read-shi')
  
  
          myArray.push('Flash');                      
  
  
          }
      }
  }   
  </code></pre>
  
  <p>So far everything works just fine.</p>
  
  <p>but when I make some changes in Read.as file like this:</p>
  
  <pre><code>package  {
  
      import flash.display.MovieClip;
  
  
      public class Read extends MovieClip {
  
          public var rezalt:Number = new Number;
          public var myArray:Array = new Array;
  
          public function Read(can:Number) {
  
              rezalt = can * 10 - 50 / 10;
              trace('Read-shi')
          }
  
          public function someFunct():void{
  
          myArray.push('Flash');                      
  
  
          }
  
  
      }
  }   
  </code></pre>
  
  <p>everything breaks down. How should I get the value of myArray into the main Class file (Gallery.as)?</p>