title: AS3 array visible false
body: <p>i want to ask about this script</p>
  
  <pre><code>var dragbener:Array = new Array (dragmc, draglagi);    
  this.addEventListener (Event.ENTER_FRAME, masukframe)
  
      function masukframe(e:Event):void {
  
       if(dragmc.visible == false &amp;&amp; draglagi.visible == false){
          //next2.visible=true;
          gotoAndStop(5);
            }
          }
  </code></pre>
  
  <p>but if i play that script the output is</p>
  
  <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at _2_fla::MainTimeline/masukframe()[_2_fla.MainTimeline::frame1:80]
  </code></pre>
  
  <p>and if i add the movieclip "dragmc" and "draglagi" in frame(5) there is no error.</p>
  
  <p>what should i do if i want to go frame 5 when the movieclip dragmc and movieclip draglagi visible is false without add the movclip dragmc and draglagi in frame 5??</p>