I have an AS3 Class that informs user of different stuff via the show method of the Alert class which is imported by Flex Builder 3.
FB3 doesn't say there are errors, but at run time the application stops and gives me an error saying the Alert class cannot be called.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.controls::Alert$/show()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\contr ols\Alert.as:483]
In 3.4, that line of Alert.as is:
var sm:ISystemManager = ISystemManager(Application.application.systemManager);
The only way that can give you a null reference error is if Application.application is null, which seems weird. Is this in a Flex (as opposed to plain ActionScript) project? You can't use Flex classes if you don't start with an <mx:Application/> tag as your entry point.
It is a Flex project.
However I can't seem to access the Alert class from an ActionScript Class that is instantiated in the Flex main application.