Skip to main content
Known Participant
July 31, 2013
Answered

Compatibility changes in ASC 2.0

I've noticed that although my old project compiles with ASC 2.0, sometimes the runtime behavior is different/wrong.  For instance sometimes I see that library symbols will not behave the same, perhaps when using goto framelabels. I can't yet exactly say under what circumstances its breaking but it definitely has to do with attached movieclips at runtime. Sometimes the graphic does not land on the frame I expect it to.

Are there compatibility flags that the mxmlc compiler can take to make it behave more like the Flex compiler of the 3.5 era?  I dont have any actual Flex dependencies, its all Swfs and actionscript. But the project works perfectly using that compiler.  Unfortunate because I want to take it mobile, and I wanted it to all work using Adobe's new compiler.

thanks a bunch.

This topic is closed to new replies. Start a new post to keep the conversation going.
zeh
zehCorrect answer
Inspiring
July 31, 2013

If you're porting that from 3.5-ish compiler it's probably a problem with CFF. The CFF default changed in 3.6 or something a couple of years ago. If that's the case, that's unrelated to ASC.

This is what I use for font embedding, non-CFF (old font support, for oldschool textfields):

[Embed(source="./../embed/fonts/android/DroidSans-Bold.ttf", fontFamily="DroidSansBold", mimeType="application/x-font", embedAsCFF="false")]

protected static const fontDSB:Class;


For reference, this is what I use for new CFF fonts, for the new text engine:

[Embed(source="./../embed/fonts/android/DroidSans-Bold.ttf", fontFamily="DroidSansBold", mimeType="application/x-font", embedAsCFF="true")]

protected static const fontDSB:Class;

And an easy way to test what's embedded, for troubleshooting:

var fonts:Array = Font.enumerateFonts(true);

var font:Font;

for (var i:int = 0; i < fonts.length; i++) {

          font = fonts;

          if (font.fontType == FontType.EMBEDDED) trace("=> " + font.fontType + " = " + font.fontName);

}

6 replies

zeh
Inspiring
July 31, 2013

This might help, since it lists all changes:

http://helpx.adobe.com/flash-builder/actionscript-compiler-backward-compatibility.html

Personally, I've found that except for the embedded asset path thing (that required small and quick changes), and the compression format (that didn't work when creating Android APKs for a while), everything else still works the same with the new compiler. I don't use much SWF-based content though.

Translate
BlakflagAuthor
Known Participant
July 31, 2013

Thanks. That's interesting.. one problem I see is that some text doesn't show up. I'm embedding a font using a relative path, like this.

    [Embed(source="../../../../../../../fonts/ABCRPN__.TTF", fontFamily="ABC")]

    private var ABC:Class;

My text doesnt show up, although it didnt generate any errors during compile. I havent changed the embed statement at all.  Do you think an adjustment needs to be made to this statement for the new compiler? I read the compatibility notes but the relative path already looked OK to me.

Translate
zeh
zehCorrect answer
Inspiring
July 31, 2013

If you're porting that from 3.5-ish compiler it's probably a problem with CFF. The CFF default changed in 3.6 or something a couple of years ago. If that's the case, that's unrelated to ASC.

This is what I use for font embedding, non-CFF (old font support, for oldschool textfields):

[Embed(source="./../embed/fonts/android/DroidSans-Bold.ttf", fontFamily="DroidSansBold", mimeType="application/x-font", embedAsCFF="false")]

protected static const fontDSB:Class;


For reference, this is what I use for new CFF fonts, for the new text engine:

[Embed(source="./../embed/fonts/android/DroidSans-Bold.ttf", fontFamily="DroidSansBold", mimeType="application/x-font", embedAsCFF="true")]

protected static const fontDSB:Class;

And an easy way to test what's embedded, for troubleshooting:

var fonts:Array = Font.enumerateFonts(true);

var font:Font;

for (var i:int = 0; i < fonts.length; i++) {

          font = fonts;

          if (font.fontType == FontType.EMBEDDED) trace("=> " + font.fontType + " = " + font.fontName);

}

Translate