0

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 ?

3
  • 1
    In a Flex Project; you're main application file has to be MXML. Everything else can be ActionScript, though. Why do you want to do this? Commented Apr 12, 2013 at 13:47
  • Hi, in my project I use mxml files only for skin classes. I simply wanted to follow my "convention". So, I will use MXML file for my main application. Thanks Commented Apr 12, 2013 at 13:59
  • 1
    please copy the comment as answer. I don't want to steal points :) Commented Apr 12, 2013 at 14:05

1 Answer 1

1

In a Flex Project; you're main application file has to be MXML. Everything else can be ActionScript, though.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.