This compiles but when you hit the test button, it says

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
    at Main/test()
    at Main/__b1_click()

Can anyone explain what this means ? It totally does not make any sense 
to me.





 >>>>>>main.mxml:
<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
    <mx:Script source="MainCode.as"/>
    <mx:Button id="b1" label="Test" click="test();"/>
   
</mx:Application>

 >>>>>>MainCode.as:
Public function test():void
{  
    var test:testClass;
    test.justtesting();
   
}

 >>>>>>testClass.as:
package  {
    public class testClass {
        public function testClass() {
         
        }
        public function justtesting():void {
            trace("just testing");
        }
    }
   
}

Reply via email to