views:

24

answers:

2

My code is:

package com.companyName.softwareName {

    import flash.display.Sprite;

    public class SoftwareName extends Sprite {

        public function SoftwareName() {

            trace("Testing!");

        }

}

and it is located in C:/dev/com/companyName/SoftwareName as SoftwareName.as

Taking the package name out lets it compile, but when it is in it tells me it the package structure isn't right, but I'm not sure what I'm doing wrong.

Is it an error I made? Or possibly my version of mxmlc is corrupt? I compile it with

mxmlc SoftwareName.as
A: 

I compile it with mxmlc SoftwareName.as

It looks like you're compiling it from the softwareName folder. You've to do it from the root of the package structure - the c:\dev\ folder. The compiler expects pack.pack1.SomeClass to be in pack/pack1/ folder relative to the current folder (from where the compiler was triggered).

cd \dev
mxmlc com\companyName\softwareName\SoftwareName.as
Amarghosh
A: 

Apparently, what I should have been doing was including "-source-path=C:\dev\" in my compiling script.

Austin Kelley Way