My flash professional cc is showing error just for simple Alert code. I have tried to solve this by reading previously discussed on this website but unable to solve it.
Error is :
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.controls::Alert$/show()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/mx/src/mx/controls/Alert.as:574]
at AlertTest()[D:\summer project\practice\AlertTest.as:7]
Can anyone suggest the reason, here is my code!!
package {
import flash.display.Sprite;
import mx.controls.Alert;
public class AlertTest extends Sprite {
public function AlertTest() {
Alert.show("Would you like to exit the application?", "Confirm", Alert.YES | Alert.NO | Alert.CANCEL);
trace("hey");
}
}
}
Before this I was getting error 1046 : type was not found or a compile time constant..
So I installed Flex skd 4.12.1 in a folder and included it as Library path in action settings for fla file. After doing that I landed up getting this error.
Kindly suggest.