user884352
user884352

Reputation:

FlashDevelop configuration error

I tried a simple Hello World program, but the console give me only this code

Running process: C:\Programmi\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Documents and Settings\utente\Documenti\Hello world\Hello world.as3proj" -ipc 2f5d48a8-f89e-4dc8-aa99-99e061c45f7f -version "4.6.0; 3.1" -compiler "C:\Programmi\FlashDevelop\Tools\flexsdk" -library "C:\Programmi\FlashDevelop\Library"
Building Hello world
mxmlc -load-config+=obj\HelloworldConfig.xml -debug=true -incremental=true -swf-version=10 -o obj\Helloworld634649421104366338
Starting java as: java.exe
INITIALIZING: Adobe Flex Compiler SHell (fcsh)
Starting new compile.
Loading configuration file C:\Programmi\FlashDevelop\Tools\flexsdk\frameworks\flex-config.xml
Loading configuration file C:\Documents and Settings\utente\Documenti\Hello world\obj\HelloworldConfig.xml
obj\Helloworld634649421104366338 (733 bytes)
(fcsh)Build succeeded
Done(0)
[No debug Flash player connection request]

It must show me Hello World! I know there is some problem with configuration, but I don't know what to do. I downloaded latest version of FlashDevelop, it use 11.1 flash debugger, and the 4.6 version of flex... Ps the code of the Hello World Class:

package 
{

    import flash.display.Sprite;
    import flash.events.Event;

    public class Main extends Sprite 
    {
        public function Main():void 
        {
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }

        private function init(e:Event = null):void 
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            // entry point
        }
    }
}

The code of Main class:

package 
{

import flash.display.Sprite;

        public class Main extends Sprite 
        {
            public function Main():void 
            {
                trace("Hello World!");
            }
        }
    }

Upvotes: 0

Views: 1695

Answers (3)

jai srivastava
jai srivastava

Reputation: 1

There are 2 places where we add flexSDK in flash

  1. Tools=>programmeSetting=>AS3Context=>Installed Flex SDK => Give the fath of SDK here

  2. Project=>properties=>sdk=>browse=>Give the fath of SDK here

Upvotes: 0

Plastic Sturgeon
Plastic Sturgeon

Reputation: 12527

Your "Hello world" class is called "Main" in its constructor and signature:

 public class Main extends Sprite 
    {
        public function Main():void 

It should be the same name as the file name. So if you class file is named HelloWorld.as it would be:

 public class HelloWorld extends Sprite 
    {
        public function HelloWorld():void  

Upvotes: 1

mpm
mpm

Reputation: 20155

Did you select your Main class as your document class in the project explorer ? there should be only one Main class in the same namespace. your class file should be in red ( or green , i'm not sure ) , check your project explorer and right click on your main class to set the document class.

Upvotes: 0

Related Questions