• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

ASC2 Compiler

Explorer ,
Aug 07, 2013 Aug 07, 2013

Copy link to clipboard

Copied

I don't know what forum to go to for help with the new compiler.  After it left the Labs, the forums we could use were marked Read Only.  Since the compiler ships with what you now call the AIR SDK, I hope you can get this request to Chris Campbell and company.

package

{

public final class A

{

    public function A() {}

}

}

compiles fine.

package any

{

public final class A

{

     public function A() {}

}

}

fails with very imprecise [no line number, no column offset] error emssage:

Error: Unable to resolve root class of SWF: A

Yes, I have provided just a simplistic example, but it is sufficient to demonstrate my problem.  Any otherwise clean/correct Actionscript Class compiles just fine.  Only change the fact that the Class needs to be in a package path hierarchy, and the above error message is all I can get.

Please provide the correct syntactical rules for asc2 and/or any parameters that need to be passed to the compiler to make this work   I know, for example, that unlike its predecessor, the new compiler will not let me point to a file named terry.as if it contains the class Terry.as and get the job done.  Ok, new rules, ok, I can live with that inconvenience, but I cannot produce an application without a package structure.

TOPICS
Development

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 07, 2013 Aug 07, 2013

Copy link to clipboard

Copied

I have created a sample project using the snippet mentioned above with latest AIR SDK available at http://www.adobe.com/devnet/air/air-sdk-download.html but there is no complile error coming. Please see the attached project https://www.dropbox.com/s/mqowae4z4127dt2/compiler.zip, please share the AIR SDK version and the IDE you are using. Also, please share the sample project if the project attached is not similar to what you are doing.

Regards,

Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 07, 2013 Aug 07, 2013

Copy link to clipboard

Copied

Thanks very much for trying to help.  When I wrote my issue, I quickly created a simple use case rather than send you my actual file.  I think that is still the way to debug my issue, for if I create the A.as file that you provided, it, indeed, immendiately throws:

Error: Unable to resolve root class of SWF: A

So, let's go to your second point.  If I run asc2.bat, which is my way of keeping separation as between requirements for compiling with the new compiler and the old one. using the -version parameter, it reports:

Version 2.0.0 build 353448

I have that from your 11.7/3.7 release.  I would have no trouble picking up the 11.8/3.8 version, but you would know whether or not there was any change in that three-month period affecting the way in which the compiler handles packages.  Has any such change been made?  Where would I track a bug report/issue?

The full command used by my asc2.bat is:

@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexlib="%AIR_SDK_HOME%\frameworks" -jar "%AIR_SDK_HOME%\lib\mxmlc-cli.jar" +configname=air -swf-version=21 -inline -warnings %*

And, yes, to answer another likely question, I have tried using version 20 instad of 21, but it does not change the error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 07, 2013 Aug 07, 2013

Copy link to clipboard

Copied

I have downloaded the latest AIR SDK as you suggested, and re-run my test.  It still fails the same way and I see that the version of the compiler from the latest 11.8/3.8 download is the same build number as I have.  I have also run the test using your mxmlc.bat in lieu of my asc2.bat just to eliminate that possible source of a problem.

So, if you say it works for you, but you sent me a FlashBuilder project, I think the only remaining difference must be the difference between using FlashBuilder and simply using command line invocation of the executables provided in the SDK's bin directory for those of us who cannot affort FlashBuilder.  Can you please test using the command line?

I did look at the file that your FlashBuilder project calls .actionScriptProperties.  I have no idea how that file is used, more particularly how it affects compilations using ASC2. Does a command line invocation of mxmlc-cli need to provide the list of <excludedEntries> your product uses?  If so, what is the air-config.xml equivalent we should use?  Your actionScriptProperties file also has an additionalCompilerArguments value setting some property named "useFlashSDK" to true.  What is the impact of that?  How is that same declaration to be made with command line invocation?

If you can create A.swf when it is in 'any' package using the command line, can you please let me know the rules?

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 07, 2013 Aug 07, 2013

Copy link to clipboard

Copied

I have now downloaded the Gaming SDK which has a slightly more recent release date and a build number suggesting that the version of mxmlc-cli that they shipped is more current than what I downloaded from the AIR_SDK url you provided.

In any case, it does not fix the problem of not being able to produce a swf if the Actionscript Class is in a package other than the default [no path] package.  And the more recent build does not change the fact that the error message emitted is practically worthless in terms of helping the user identify what has caused the compiler to choke.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 08, 2013 Aug 08, 2013

Copy link to clipboard

Copied

Hi,

We are able to reproduce the issue. Could you please open a new bug report on this over at bugbase.adobe.com? Please include the sample project. Once the bug has been added would you mind posting back with the URL so that others affected can add their votes and comments?

Regards,

Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 08, 2013 Aug 08, 2013

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines