6 Replies Latest reply on Mar 16, 2011 8:00 AM by chriswillis100

    Calling functions

    chriswillis100 Level 1

      Hey all,


      I have a function in a main mxml file and i would like to call it from a component.

      The main file is in a directory called views


      I have tried doing this in my component to call it:



      private function new_document():void {

      var clear:Function = playdrawhome.clear_func()











      <views:DocHome id="dochome" />





      But adobe air gives me this error:


      Cannot access a property or method of a null object reference



      Can anyone help?