From c47e9f0769faafe7bef65c4591cd0b7e1d971f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Wed, 15 May 2013 20:54:20 +0200 Subject: [PATCH] FLA export - AS3 linkage, Text stub --- .../decompiler/flash/tags/DefineFont2Tag.java | 5 + .../decompiler/flash/tags/DefineFont3Tag.java | 5 + .../flash/tags/DefineFontInfo2Tag.java | 17 +- .../decompiler/flash/tags/DefineFontTag.java | 35 ++- .../decompiler/flash/tags/base/FontTag.java | 2 + .../decompiler/flash/xfl/XFLConverter.java | 252 +++++++++++++----- 6 files changed, 244 insertions(+), 72 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index 2fac0efa9..fff9929c1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -246,4 +246,9 @@ public class DefineFont2Tag extends CharacterTag implements FontTag { public int charToGlyph(List tags, char c) { return codeTable.indexOf((Integer) (int) c); } + + @Override + public String getFontName(List tags){ + return fontName; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index d4f28d30f..4d1c6ee14 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -246,4 +246,9 @@ public class DefineFont3Tag extends CharacterTag implements FontTag { public int getCharacterID() { return fontId; } + + @Override + public String getFontName(List tags){ + return fontName; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index 414f7fb94..1328c9596 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -23,6 +23,8 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; +import java.util.ArrayList; +import java.util.List; /** * @@ -40,7 +42,7 @@ public class DefineFontInfo2Tag extends Tag { public boolean fontFlagsBold; public boolean fontFlagsWideCodes; public LANGCODE languageCode; - public int codeTable[]; + public List codeTable; /** * Gets data bytes @@ -65,8 +67,8 @@ public class DefineFontInfo2Tag extends Tag { sos.writeUB(1, fontFlagsBold ? 1 : 0); sos.writeUB(1, fontFlagsWideCodes ? 1 : 0); sos.writeLANGCODE(languageCode); - for (int i = 0; i < codeTable.length; i++) { - sos.writeUI16(codeTable[i]); + for (int c:codeTable) { + sos.writeUI16(c); } } catch (IOException e) { } @@ -92,11 +94,12 @@ public class DefineFontInfo2Tag extends Tag { fontFlagsANSI = sis.readUB(1) == 1; fontFlagsItalic = sis.readUB(1) == 1; fontFlagsBold = sis.readUB(1) == 1; - fontFlagsWideCodes = sis.readUB(1) == 1; + fontFlagsWideCodes = sis.readUB(1) == 1; //Always 1 languageCode = sis.readLANGCODE(); - codeTable = new int[sis.available() / 2]; - for (int i = 0; i < codeTable.length; i++) { - codeTable[i] = sis.readUI16(); + int ctLen= sis.available() / 2; + codeTable = new ArrayList(); + for (int i = 0; i < ctLen; i++) { + codeTable.add(sis.readUI16()); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java index 080e8e405..931e9ea75 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java @@ -38,6 +38,7 @@ public class DefineFontTag extends CharacterTag implements FontTag { public int offsetTable[]; public SHAPE glyphShapeTable[]; private DefineFontInfoTag fontInfoTag = null; + private DefineFontInfo2Tag fontInfo2Tag = null; @Override public int getGlyphAdvance(int glyphIndex) { @@ -58,6 +59,12 @@ public class DefineFontTag extends CharacterTag implements FontTag { break; } } + if (t instanceof DefineFontInfo2Tag) { + if (((DefineFontInfo2Tag) t).fontID == fontId) { + fontInfo2Tag = (DefineFontInfo2Tag) t; + break; + } + } } } } @@ -65,17 +72,25 @@ public class DefineFontTag extends CharacterTag implements FontTag { @Override public char glyphToChar(List tags, int glyphIndex) { ensureFontInfo(tags); - if (fontInfoTag == null) { - return '?'; - } else { + if (fontInfo2Tag != null) { + return (char) (int) fontInfo2Tag.codeTable.get(glyphIndex); + }else if (fontInfoTag != null) { return (char) (int) fontInfoTag.codeTable.get(glyphIndex); + } else { + return '?'; } } @Override public int charToGlyph(List tags, char c) { ensureFontInfo(tags); - return fontInfoTag.codeTable.indexOf(c); + if(fontInfo2Tag!=null){ + return fontInfo2Tag.codeTable.indexOf(c); + }else if(fontInfoTag!=null){ + return fontInfoTag.codeTable.indexOf(c); + } + return -1; + } /** @@ -140,4 +155,16 @@ public class DefineFontTag extends CharacterTag implements FontTag { public int getCharacterID() { return fontId; } + + @Override + public String getFontName(List tags){ + ensureFontInfo(tags); + if(fontInfo2Tag!=null){ + return fontInfo2Tag.fontName; + } + if(fontInfoTag!=null){ + return fontInfoTag.fontName; + } + return null; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java index 25256d295..cd4ecb264 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java @@ -37,4 +37,6 @@ public interface FontTag extends AloneTag { public int getGlyphAdvance(int glyphIndex); public int getGlyphWidth(int glyphIndex); + + public String getFontName(List tags); } diff --git a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index bfadbe6aa..900c85152 100644 --- a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -20,15 +20,21 @@ import com.jpexs.decompiler.flash.Main; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.tags.ABCContainerTag; import com.jpexs.decompiler.flash.tags.DefineButton2Tag; +import com.jpexs.decompiler.flash.tags.DefineFontNameTag; import com.jpexs.decompiler.flash.tags.DefineSpriteTag; +import com.jpexs.decompiler.flash.tags.DefineText2Tag; +import com.jpexs.decompiler.flash.tags.DefineTextTag; import com.jpexs.decompiler.flash.tags.PlaceObjectTypeTag; import com.jpexs.decompiler.flash.tags.SetBackgroundColorTag; import com.jpexs.decompiler.flash.tags.ShowFrameTag; +import com.jpexs.decompiler.flash.tags.SymbolClassTag; import com.jpexs.decompiler.flash.tags.Tag; import com.jpexs.decompiler.flash.tags.base.ButtonTag; import com.jpexs.decompiler.flash.tags.base.CharacterTag; +import com.jpexs.decompiler.flash.tags.base.FontTag; import com.jpexs.decompiler.flash.tags.base.ImageTag; import com.jpexs.decompiler.flash.tags.base.ShapeTag; +import com.jpexs.decompiler.flash.tags.base.TextTag; import com.jpexs.decompiler.flash.types.BUTTONRECORD; import com.jpexs.decompiler.flash.types.CXFORM; import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA; @@ -42,9 +48,11 @@ import com.jpexs.decompiler.flash.types.LINESTYLE2; import com.jpexs.decompiler.flash.types.LINESTYLEARRAY; import com.jpexs.decompiler.flash.types.MATRIX; import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.RGB; import com.jpexs.decompiler.flash.types.RGBA; import com.jpexs.decompiler.flash.types.SHAPE; import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.decompiler.flash.types.TEXTRECORD; import com.jpexs.decompiler.flash.types.filters.BEVELFILTER; import com.jpexs.decompiler.flash.types.filters.BLURFILTER; import com.jpexs.decompiler.flash.types.filters.COLORMATRIXFILTER; @@ -57,6 +65,8 @@ import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; +import java.awt.Font; +import java.awt.GraphicsEnvironment; import java.awt.Point; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; @@ -70,6 +80,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Stack; import java.util.logging.Level; import java.util.logging.Logger; @@ -88,9 +99,13 @@ import javax.xml.transform.stream.StreamSource; * @author JPEXS */ public class XFLConverter { - - private XFLConverter(){ - + + public static final int KEY_MODE_NORMAL = 9728; + public static final int KEY_MODE_CLASSIC_TWEEN = 22017; + public static final int KEY_MODE_SHAPE_TWEEN = 17922; + public static final int KEY_MODE_MOTION_TWEEN = 8195; + + private XFLConverter() { } public static String convertShapeEdge(MATRIX mat, SHAPERECORD record, int x, int y) { @@ -153,7 +168,7 @@ public class XFLConverter { + ""; } - public static String convertLineStyle(LINESTYLE2 ls, int shapeNum) { + public static String convertLineStyle(HashMap characters, LINESTYLE2 ls, int shapeNum) { String ret = ""; String params = ""; if (ls.pixelHintingFlag) { @@ -198,7 +213,7 @@ public class XFLConverter { + (ls.color.getAlphaFloat() != 1 ? " alpha=\"" + ls.color.getAlphaFloat() + "\"" : "") + "\"/>"; } else { - ret += convertFillStyle(ls.fillType, shapeNum); + ret += convertFillStyle(characters, ls.fillType, shapeNum); } ret += ""; ret += ""; @@ -209,7 +224,7 @@ public class XFLConverter { return ((float) i) / (1 << 16); } - public static String convertFillStyle(FILLSTYLE fs, int shapeNum) { + public static String convertFillStyle(HashMap characters, FILLSTYLE fs, int shapeNum) { String ret = ""; //ret += ""; switch (fs.fillStyleType) { @@ -231,7 +246,13 @@ public class XFLConverter { case NON_SMOOTHED_REPEATING_BITMAP: case NON_SMOOTHED_CLIPPED_BITMAP: ret += " characters, MATRIX mat, int shapeNum, SHAPE shape) { + return convertShape(characters, mat, shapeNum, shape.shapeRecords); } - public static String convertShape(MATRIX mat, int shapeNum, SHAPEWITHSTYLE shape) { - return convertShape(mat, shapeNum, shape.shapeRecords, shape.fillStyles, shape.lineStyles); + public static String convertShape(HashMap characters, MATRIX mat, int shapeNum, SHAPEWITHSTYLE shape) { + return convertShape(characters, mat, shapeNum, shape.shapeRecords, shape.fillStyles, shape.lineStyles); } - public static String convertShape(MATRIX mat, ShapeTag shape) { - return convertShape(mat, shape.getShapeNum(), shape.getShapes()); + public static String convertShape(HashMap characters, MATRIX mat, ShapeTag shape) { + return convertShape(characters, mat, shape.getShapeNum(), shape.getShapes()); } - public static String convertShape(MATRIX mat, int shapeNum, List shapeRecords) { - return convertShape(mat, shapeNum, shapeRecords, null, null); + public static String convertShape(HashMap characters, MATRIX mat, int shapeNum, List shapeRecords) { + return convertShape(characters, mat, shapeNum, shapeRecords, null, null); } - public static String convertShape(MATRIX mat, int shapeNum, List shapeRecords, FILLSTYLEARRAY fillStyles, LINESTYLEARRAY lineStyles) { + public static String convertShape(HashMap characters, MATRIX mat, int shapeNum, List shapeRecords, FILLSTYLEARRAY fillStyles, LINESTYLEARRAY lineStyles) { String ret = ""; if (mat == null) { mat = new MATRIX(); @@ -372,7 +393,7 @@ public class XFLConverter { if (fillStyles != null) { for (FILLSTYLE fs : fillStyles.fillStyles) { fillsStr += ""; - fillsStr += convertFillStyle(fs, shapeNum); + fillsStr += convertFillStyle(characters, fs, shapeNum); fillsStr += ""; fillStyleCount++; } @@ -382,7 +403,7 @@ public class XFLConverter { if (shapeNum == 4) { for (int l = 0; l < lineStyles.lineStyles2.length; l++) { strokesStr += ""; - strokesStr += convertLineStyle(lineStyles.lineStyles2[l], shapeNum); + strokesStr += convertLineStyle(characters, lineStyles.lineStyles2[l], shapeNum); strokesStr += ""; lineStyleCount++; } @@ -402,14 +423,14 @@ public class XFLConverter { if (scr.stateNewStyles) { for (int f = 0; f < scr.fillStyles.fillStyles.length; f++) { fillsStr += ""; - fillsStr += convertFillStyle(scr.fillStyles.fillStyles[f], shapeNum); + fillsStr += convertFillStyle(characters, scr.fillStyles.fillStyles[f], shapeNum); fillsStr += ""; fillStyleCount++; } if (shapeNum == 4) { for (int l = 0; l < scr.lineStyles.lineStyles2.length; l++) { strokesStr += ""; - strokesStr += convertLineStyle(scr.lineStyles.lineStyles2[l], shapeNum); + strokesStr += convertLineStyle(characters, scr.lineStyles.lineStyles2[l], shapeNum); strokesStr += ""; lineStyleCount++; } @@ -801,7 +822,7 @@ public class XFLConverter { return new Date().getTime() / 1000; } - public static String convertLibrary(List oneInstanceShapes, String backgroundColor, List tags, HashMap characters, HashMap files) { + public static String convertLibrary(Map characterClasses, List oneInstanceShapes, String backgroundColor, List tags, HashMap characters, HashMap files) { String ret = ""; List media = new ArrayList(); List symbols = new ArrayList(); @@ -819,6 +840,9 @@ public class XFLConverter { } else if (symbol instanceof ButtonTag) { symbolStr += " symbolType=\"button\""; } + if (characterClasses.containsKey(symbol.getCharacterID())) { + symbolStr += " linkageExportForAS=\"true\" linkageClassName=\"" + characterClasses.get(symbol.getCharacterID()) + "\""; + } symbolStr += ">"; symbolStr += ""; String itemIcon = null; @@ -868,7 +892,7 @@ public class XFLConverter { if (duration > 1) { symbolStr += " duration=\"" + duration + "\""; } - symbolStr += " keyMode=\"9728\">"; + symbolStr += " keyMode=\"" + KEY_MODE_NORMAL + "\">"; symbolStr += ""; symbolStr += recCharStr; symbolStr += ""; @@ -890,9 +914,9 @@ public class XFLConverter { symbolStr += ""; symbolStr += ""; //color=\"#4FFF4F\" symbolStr += ""; - symbolStr += ""; + symbolStr += ""; symbolStr += ""; - symbolStr += convertShape(null, shape); + symbolStr += convertShape(characters, null, shape); symbolStr += ""; symbolStr += ""; symbolStr += ""; @@ -916,32 +940,32 @@ public class XFLConverter { } symbLinkStr += " loadImmediate=\"false\" lastModified=\"" + getTimestamp() + "\"/>"; //TODO: itemID=\"518de416-00000341\" symbols.add(symbLinkStr); - } else { - if (symbol instanceof ImageTag) { - ImageTag imageTag = (ImageTag) symbol; - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - BufferedImage image = imageTag.getImage(tags); - String format = imageTag.getImageFormat(); - try { - ImageIO.write(image, format.toUpperCase(), baos); - } catch (IOException ex) { - Logger.getLogger(XFLConverter.class.getName()).log(Level.SEVERE, null, ex); - } - String symbolFile = "bitmap" + symbol.getCharacterID() + "." + imageTag.getImageFormat(); - files.put(symbolFile, baos.toByteArray()); - String mediaLinkStr = "\n"; - //sourceExternalFilepath=\"../xfl/LIBRARY/Page-White-Code-32.png\" - //itemID=\"518d55d6-00000304\" - media.add(mediaLinkStr); + } else if (symbol instanceof ImageTag) { + ImageTag imageTag = (ImageTag) symbol; + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + BufferedImage image = imageTag.getImage(tags); + String format = imageTag.getImageFormat(); + try { + ImageIO.write(image, format.toUpperCase(), baos); + } catch (IOException ex) { + Logger.getLogger(XFLConverter.class.getName()).log(Level.SEVERE, null, ex); } - //bitmap,sound... + String symbolFile = "bitmap" + symbol.getCharacterID() + "." + imageTag.getImageFormat(); + files.put(symbolFile, baos.toByteArray()); + String mediaLinkStr = "\n"; + media.add(mediaLinkStr); + } + //TODO: sound, video... } if (!media.isEmpty()) { ret += ""; @@ -998,7 +1022,9 @@ public class XFLConverter { if (characters.containsKey(characterId)) { CharacterTag ch = characters.get(characterId); if ((ch instanceof ShapeTag) && oneInstanceShapes.contains(characterId)) { - elements += convertShape(po.getMatrix(), (ShapeTag) ch); + elements += convertShape(characters, po.getMatrix(), (ShapeTag) ch); + } else if (ch instanceof TextTag) { + elements += convertText(tags, (TextTag) ch, po.getMatrix()); } else { elements += convertSymbolInstance(po.getName(), po.getMatrix(), po.getColorTransform(), po.getColorTransformWithAlpha(), po.getBlendMode(), po.getFilters(), characters.get(characterId), characters); } @@ -1012,7 +1038,7 @@ public class XFLConverter { if (duration > 1) { ret += " duration=\"" + duration + "\""; } - ret += " keyMode=\"9728\">"; + ret += " keyMode=\"" + KEY_MODE_NORMAL + "\">"; ret += ""; ret += lastElements; ret += ""; @@ -1032,7 +1058,7 @@ public class XFLConverter { if (duration > 1) { ret += " duration=\"" + duration + "\""; } - ret += " keyMode=\"9728\">"; + ret += " keyMode=\"" + KEY_MODE_NORMAL + "\">"; ret += ""; ret += lastElements; ret += ""; @@ -1143,6 +1169,109 @@ public class XFLConverter { } } + private static Map getCharacterClasses(List tags) { + Map ret = new HashMap(); + for (Tag t : tags) { + if (t instanceof SymbolClassTag) { + SymbolClassTag sc = (SymbolClassTag) t; + for (int i = 0; i < sc.tagIDs.length; i++) { + if (!ret.containsKey(sc.tagIDs[i]) && !ret.containsValue(sc.classNames[i])) { + ret.put(sc.tagIDs[i], sc.classNames[i]); + } + } + } + } + return ret; + } + + public static String convertText(List tags, TextTag tag, MATRIX matrix) { + String ret = ""; + if (matrix == null) { + matrix = new MATRIX(); + } + String matStr = ""; + matStr += ""; + matStr += convertMatrix(matrix); + matStr += ""; + if ((tag instanceof DefineTextTag) || (tag instanceof DefineText2Tag)) { + ret += ""; + ret += matStr; + List textRecords = new ArrayList(); + if (tag instanceof DefineTextTag) { + textRecords = ((DefineTextTag) tag).textRecords; + } else if (tag instanceof DefineText2Tag) { + textRecords = ((DefineText2Tag) tag).textRecords; + } + ret += ""; + int fontId = -1; + FontTag font = null; + String fontName = null; + String psFontName = null; + String availableFonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); + int textHeight = -1; + RGB textColor = null; + RGBA textColorA = null; + for (TEXTRECORD rec : textRecords) { + if (rec.styleFlagsHasColor) { + if (tag instanceof DefineTextTag) { + textColor = rec.textColor; + } else { + textColorA = rec.textColorA; + } + } + if (rec.styleFlagsHasFont) { + fontId = rec.fontId; + fontName = null; + textHeight = rec.textHeight; + font = null; + for (Tag t : tags) { + if (t instanceof FontTag) { + if (((FontTag) t).getFontId() == fontId) { + font = (FontTag) t; + } + } + if (t instanceof DefineFontNameTag) { + if (((DefineFontNameTag) t).fontId == fontId) { + fontName = ((DefineFontNameTag) t).fontName; + } + } + } + if ((fontName == null) && (font != null)) { + fontName = font.getFontName(tags); + } + psFontName = null; + if (fontName != null) { + for (String avFont : availableFonts) { + if (avFont.equals(fontName)) { + Font f = new Font(fontName, 0, 10); + psFontName = f.getPSName(); + } + } + } + } + ret += ""; + ret += "" + rec.getText(tags, font) + ""; + ret += ""; + + ret += " files = new HashMap(); HashMap characters = getCharacters(swf.tags); List oneInstaceShapes = getOneInstanceShapes(swf.tags, characters); + Map characterClasses = getCharacterClasses(swf.tags); String backgroundColor = "#ffffff"; for (Tag t : swf.tags) { if (t instanceof SetBackgroundColorTag) { @@ -1162,7 +1292,7 @@ public class XFLConverter { backgroundColor = sbc.backgroundColor.toHexRGB(); } } - domDocument += convertLibrary(oneInstaceShapes, backgroundColor, swf.tags, characters, files); + domDocument += convertLibrary(characterClasses, oneInstaceShapes, backgroundColor, swf.tags, characters, files); domDocument += ""; domDocument += convertTimeline(oneInstaceShapes, backgroundColor, swf.tags, characters, "Scene 1"); domDocument += ""; @@ -1259,14 +1389,14 @@ public class XFLConverter { + " CONFIG::FLASH_AUTHORING="true";\n" + " 0\n" + " \n" - + " 1\n" - + " 0\n" + + " " + (swf.compressed ? "1" : "0") + "\n" + + " " + (swf.lzma ? "1" : "0") + "\n" + " 1\n" + " 0\n" + " 0\n" + " 0\n" + " 0\n" - + " \n" + + " " + (characterClasses.containsKey(0) ? characterClasses.get(0) : "") + "\n" + " 2\n" + " 4\n" + " 4096\n" @@ -1331,8 +1461,8 @@ public class XFLConverter { + " 1\n" + " \n" + " \n" - + " 550\n" - + " 400\n" + + " " + (swf.displayRect.getWidth() / 20) + "\n" + + " " + (swf.displayRect.getHeight() / 20) + "\n" + " 0\n" + " 1\n" + " 1\n" @@ -1350,8 +1480,8 @@ public class XFLConverter { + " \n" + " \n" + " \n" - + " 550\n" - + " 400\n" + + " " + (swf.displayRect.getWidth() / 20) + "\n" + + " " + (swf.displayRect.getHeight() / 20) + "\n" + " 1\n" + " 0\n" + " 0\n" @@ -1367,8 +1497,8 @@ public class XFLConverter { + " \n" + " \n" + " \n" - + " 550\n" - + " 400\n" + + " " + (swf.displayRect.getWidth() / 20) + "\n" + + " " + (swf.displayRect.getHeight() / 20) + "\n" + " 1\n" + " 0\n" + " \n"