title: AS3: Accessing custom class public functions from a MovieClip on a timeline
body: <p>I've got a AS3 program with a Main.as custom class.</p>
  
  <p>In this class I load an instance of a 'menu' movieclip which has simpleButton instances inside... How do I access the Main class public functions by the menu movieclip buttons?</p>
  
  <p>I.e. Menu button -> gotoPage(5); (which is a Main public function)</p>
  
  <p>If I try to access the Main function with the above statement, it gives</p>
  
  <p>"1180: Call to a possibly undefined method gotoPage.</p>