Reputation: 3165
I'm trying to create Flex project with an actionscript
application file, not a mxml
file.
I simply use this code :
package
{
import spark.components.Application;
public class Test extends Application
{
public function Test(){
super();
}
}
}
But I receive this error :
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at mx.preloaders::Preloader/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\preloaders\Preloader.as:261]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2097]
at mx.managers::SystemManager/initHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2582]
How can I create a full AS application class for Flex project please ?
Upvotes: 0
Views: 207
Reputation: 39408
In a Flex Project; you're main application file has to be MXML. Everything else can be ActionScript, though.
Upvotes: 1