Skip to main content
Inspiring
December 20, 2011
Answered

How to compile package file?

  • December 20, 2011
  • 1 reply
  • 894 views

I have an actionscript file,it has a package name,it locate C:\demo directory,like follows:

package demo{

import flash.display.*;

public class ABC extends Sprite{

  public function ABC(){

     ......

  }

}

}

Then I compile above code like following command,but it raise following error:

C:\>mxmlc demo\ABC.as

Loading configuration file C:\sdk\frameworks\flex-config.xml

C:\demo\ABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'demo'.

Where is wrong above command?

Thanks

This topic has been closed for replies.
Correct answer Kenneth Kawamoto

Set source-path, e.g.

mxmlc demo\ABC.as -source-path=.

--

Kenneth Kawamoto

http://www.materiaprima.co.uk/

1 reply

Kenneth Kawamoto
Community Expert
Kenneth KawamotoCommunity ExpertCorrect answer
Community Expert
December 21, 2011

Set source-path, e.g.

mxmlc demo\ABC.as -source-path=.

--

Kenneth Kawamoto

http://www.materiaprima.co.uk/