Fixed #1866 FLA export - multilevel clipping handling

Fixed #1866 FLA export - morphshape rounding fix
This commit is contained in:
Jindra Petřík
2023-10-29 12:27:29 +01:00
parent 38ed5ee829
commit 669ffbd1a7
18 changed files with 1390 additions and 69 deletions

View File

@@ -38,6 +38,8 @@ All notable changes to this project will be documented in this file.
- SVG import - Do not use fill winding nonzero when only stroking
- Morphshape SVG export - closing the stroke
- [#2031] FLA export - morphshapes with duplicated strokes, timelines with multiple shape tweens
- [#1866] FLA export - multilevel clipping handling
- [#1866] FLA export - morphshape rounding fix
### Changed
- Basic tag info panel always visible even when nothing to display (to avoid flickering)
@@ -3232,6 +3234,7 @@ Major version of SWF to XML export changed to 2.
[#2013]: https://www.free-decompiler.com/flash/issues/2013
[#2104]: https://www.free-decompiler.com/flash/issues/2104
[#2031]: https://www.free-decompiler.com/flash/issues/2031
[#1866]: https://www.free-decompiler.com/flash/issues/1866
[#2099]: https://www.free-decompiler.com/flash/issues/2099
[#2090]: https://www.free-decompiler.com/flash/issues/2090
[#2079]: https://www.free-decompiler.com/flash/issues/2079

View File

@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.exporters.commonshape;
import com.jpexs.decompiler.flash.types.MATRIX;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
/**
*
@@ -163,6 +164,11 @@ public final class Matrix implements Cloneable {
Point p = transform(point.x, point.y);
return new java.awt.Point((int) p.x, (int) p.y);
}
public Point2D transform(Point2D point) {
Point p = transform(point.getX(), point.getY());
return new Point2D.Double(p.x, p.y);
}
public ExportRectangle transform(ExportRectangle rect) {
double minX = Double.MAX_VALUE;

View File

@@ -472,7 +472,12 @@ public class PlaceObject2Tag extends PlaceObjectTypeTag implements ASMSourceCont
public void setPlaceFlagHasMatrix(boolean placeFlagHasMatrix) {
this.placeFlagHasMatrix = placeFlagHasMatrix;
}
@Override
public void setPlaceFlagMove(boolean placeFlagMove) {
this.placeFlagMove = placeFlagMove;
}
@Override
public boolean hasImage() {
return false;

View File

@@ -676,6 +676,11 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
this.placeFlagHasMatrix = placeFlagHasMatrix;
}
@Override
public void setPlaceFlagMove(boolean placeFlagMove) {
this.placeFlagMove = placeFlagMove;
}
@Override
public boolean hasImage() {
return placeFlagHasImage;

View File

@@ -697,6 +697,11 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont
this.placeFlagHasMatrix = placeFlagHasMatrix;
}
@Override
public void setPlaceFlagMove(boolean placeFlagMove) {
this.placeFlagMove = placeFlagMove;
}
@Override
public boolean hasImage() {
return placeFlagHasImage;

View File

@@ -287,6 +287,11 @@ public class PlaceObjectTag extends PlaceObjectTypeTag {
}
@Override
public void setPlaceFlagMove(boolean placeFlagMove) {
}
@Override
public boolean hasImage() {
return false;

View File

@@ -28,6 +28,7 @@ import com.jpexs.decompiler.flash.types.filters.FILTER;
import com.jpexs.helpers.ByteArrayRange;
import java.io.IOException;
import java.util.List;
import java.util.Objects;
/**
*
@@ -90,6 +91,51 @@ public abstract class PlaceObjectTypeTag extends Tag implements CharacterIdTag {
public abstract void setPlaceFlagHasClipActions(boolean placeFlagHasClipActions);
public abstract void setPlaceFlagHasMatrix(boolean placeFlagHasMatrix);
public abstract void setPlaceFlagMove(boolean placeFlagMove);
public boolean placeEquals(PlaceObjectTypeTag other) {
if (getDepth() != other.getDepth()) {
return false;
}
if (!Objects.equals(getMatrix(), other.getMatrix())) {
return false;
}
if (!Objects.equals(getInstanceName(), other.getInstanceName())) {
return false;
}
if (!Objects.equals(getClassName(), other.getClassName())) {
return false;
}
if (cacheAsBitmap() != other.cacheAsBitmap()) {
return false;
}
if (hasImage() != other.hasImage()) {
return false;
}
if (isVisible() != other.isVisible()) {
return false;
}
if (!Objects.equals(getVisible(), other.getVisible())) {
return false;
}
if (!Objects.equals(getBackgroundColor(), other.getBackgroundColor())) {
return false;
}
if (flagMove() != other.flagMove()) {
return false;
}
if (getRatio() != other.getRatio()) {
return false;
}
if (!Objects.equals(getClipActions(), other.getClipActions())) { //?
return false;
}
if (!Objects.equals(getAmfData(), other.getAmfData())) { //?
return false;
}
return true;
}
@Override
public String getName() {

View File

@@ -79,6 +79,7 @@ import com.jpexs.decompiler.flash.tags.DoInitActionTag;
import com.jpexs.decompiler.flash.tags.ExportAssetsTag;
import com.jpexs.decompiler.flash.tags.FileAttributesTag;
import com.jpexs.decompiler.flash.tags.FrameLabelTag;
import com.jpexs.decompiler.flash.tags.PlaceObject2Tag;
import com.jpexs.decompiler.flash.tags.SetBackgroundColorTag;
import com.jpexs.decompiler.flash.tags.ShowFrameTag;
import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag;
@@ -113,6 +114,7 @@ import com.jpexs.decompiler.flash.types.FOCALGRADIENT;
import com.jpexs.decompiler.flash.types.GRADIENT;
import com.jpexs.decompiler.flash.types.GRADRECORD;
import com.jpexs.decompiler.flash.types.ILINESTYLE;
import com.jpexs.decompiler.flash.types.LINESTYLE;
import com.jpexs.decompiler.flash.types.LINESTYLE2;
import com.jpexs.decompiler.flash.types.LINESTYLEARRAY;
import com.jpexs.decompiler.flash.types.MATRIX;
@@ -147,6 +149,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.ScopeStack;
import com.jpexs.helpers.Helper;
import com.jpexs.helpers.Path;
import com.jpexs.helpers.Reference;
import com.jpexs.helpers.SerializableImage;
import com.jpexs.helpers.XmlPrettyFormat;
import com.jpexs.helpers.utf8.Utf8Helper;
@@ -166,11 +169,14 @@ import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
@@ -227,11 +233,14 @@ public class XFLConverter {
*/
private final boolean DEBUG_EXPORT_LAYER_DEPTHS = false;
private static String formatEdgeDouble(double value, boolean curved) {
private static String formatEdgeDouble(double value, boolean curved, boolean morphshape) {
if (value % 1 == 0) {
return "" + (int) value;
}
DecimalFormat df = new DecimalFormat("0.##", DecimalFormatSymbols.getInstance(Locale.ENGLISH));
if (morphshape) {
value = Math.round(value * 2.0) / 2.0;
}
DecimalFormat df = new DecimalFormat(morphshape ? "0.#" : "0.##", DecimalFormatSymbols.getInstance(Locale.ENGLISH));
df.setGroupingUsed(false);
String strValue = "" + df.format(value);
@@ -242,33 +251,43 @@ public class XFLConverter {
return "" + strValue;
}
private static String convertShapeEdge(ShapeRecordAdvanced record, double x, double y) {
private static String convertShapeEdge(MATRIX mat, ShapeRecordAdvanced record, double x, double y, boolean morphshape) {
if (record instanceof StyleChangeRecordAdvanced) {
StyleChangeRecordAdvanced scr = (StyleChangeRecordAdvanced) record;
Point2D p = new Point2D.Double(scr.moveDeltaX, scr.moveDeltaY);
//p = new Matrix(mat).transform(p);
if (scr.stateMoveTo) {
return "! " + formatEdgeDouble(p.getX(), false) + " " + formatEdgeDouble(p.getY(), false);
//return "! " + formatEdgeDouble(p.getX(), false) + " " + formatEdgeDouble(p.getY(), false);
return "";
}
} else if (record instanceof StraightEdgeRecordAdvanced) {
StraightEdgeRecordAdvanced ser = (StraightEdgeRecordAdvanced) record;
Point2D p1 = new Point2D.Double(x, y);
Point2D p = new Point2D.Double(x + ser.deltaX, y + ser.deltaY);
return "! " + formatEdgeDouble(x, false) + " " + formatEdgeDouble(y, false)
+ "| " + formatEdgeDouble(p.getX(), false) + " " + formatEdgeDouble(p.getY(), false);
p = new Matrix(mat).transform(p);
p1 = new Matrix(mat).transform(p1);
return "! " + formatEdgeDouble(p1.getX(), false, morphshape) + " " + formatEdgeDouble(p1.getY(), false, morphshape)
+ "| " + formatEdgeDouble(p.getX(), false, morphshape) + " " + formatEdgeDouble(p.getY(), false, morphshape);
} else if (record instanceof CurvedEdgeRecordAdvanced) {
CurvedEdgeRecordAdvanced cer = (CurvedEdgeRecordAdvanced) record;
double controlX = cer.controlDeltaX + x;
double controlY = cer.controlDeltaY + y;
double anchorX = cer.anchorDeltaX + controlX;
double anchorY = cer.anchorDeltaY + controlY;
Point2D p1 = new Point2D.Double(x, y);
Point2D control = new Point2D.Double(controlX, controlY);
Point2D anchor = new Point.Double(anchorX, anchorY);
return "! " + formatEdgeDouble(x, false) + " " + formatEdgeDouble(y, false)
+ "[ " + formatEdgeDouble(control.getX(), true) + " " + formatEdgeDouble(control.getY(), true) + " " + formatEdgeDouble(anchor.getX(), true) + " " + formatEdgeDouble(anchor.getY(), true);
p1 = new Matrix(mat).transform(p1);
control = new Matrix(mat).transform(control);
anchor = new Matrix(mat).transform(anchor);
return "! " + formatEdgeDouble(p1.getX(), false, morphshape) + " " + formatEdgeDouble(p1.getY(), false, morphshape)
+ "[ " + formatEdgeDouble(control.getX(), true, morphshape) + " " + formatEdgeDouble(control.getY(), true, morphshape) + " " + formatEdgeDouble(anchor.getX(), true, morphshape) + " " + formatEdgeDouble(anchor.getY(), true, morphshape);
}
return "";
}
private static void convertShapeEdges(boolean close, double startX, double startY, MATRIX mat, List<ShapeRecordAdvanced> recordsAdvanced, StringBuilder ret) {
private static void convertShapeEdges(boolean close, double startX, double startY, MATRIX mat, List<ShapeRecordAdvanced> recordsAdvanced, StringBuilder ret, boolean morphshape) {
double x = startX;
double y = startY;
@@ -282,7 +301,7 @@ public class XFLConverter {
}
}
if (!hasMove) {
ret.append("! ").append(formatEdgeDouble(startX, false)).append(" ").append(formatEdgeDouble(startY, false));
//ret.append("! ").append(formatEdgeDouble(startX, false)).append(" ").append(formatEdgeDouble(startY, false));
}
double lastMoveToX = startX;
double lastMoveToY = startY;
@@ -315,7 +334,7 @@ public class XFLConverter {
}
String edge = convertShapeEdge(rec, x, y);
String edge = convertShapeEdge(mat, rec, x, y, morphshape);
//ignore duplicated edges with only strokes #2031
if (fillStyle0 == 0 && fillStyle1 == 0 && lineStyle != 0) {
@@ -334,7 +353,7 @@ public class XFLConverter {
//hack for morphshapes. TODO: make this better
if (close && (Double.compare(lastMoveToX, x) != 0 || Double.compare(lastMoveToY, y) != 0)) {
StraightEdgeRecordAdvanced ser = new StraightEdgeRecordAdvanced(lastMoveToX - x, lastMoveToY - y);
ret.append(convertShapeEdge(ser, x, y));
ret.append(convertShapeEdge(mat, ser, x, y, morphshape));
}
}
@@ -355,28 +374,24 @@ public class XFLConverter {
return "normal";
}
private static void convertLineStyle(ILINESTYLE ls, int shapeNum, XFLXmlWriter writer) throws XMLStreamException {
private static void convertLineStyle1(LINESTYLE ls, int shapeNum, XFLXmlWriter writer) throws XMLStreamException {
writer.writeStartElement("SolidStroke", new String[]{
"scaleMode", getScaleMode(ls),
"weight", Double.toString(((float) ls.getWidth()) / SWF.unitDivisor)});
writer.writeStartElement("fill");
if (!(ls instanceof LINESTYLE2) || !((LINESTYLE2) ls).hasFillFlag) {
writer.writeStartElement("SolidColor", new String[]{"color", ls.getColor().toHexRGB()});
if (shapeNum >= 3) {
writer.writeAttribute("alpha", ((RGBA) ls.getColor()).getAlphaFloat());
}
writer.writeEndElement();
} else {
// todo: line fill
writer.writeStartElement("SolidColor", new String[]{"color", ls.getColor().toHexRGB()});
if (shapeNum >= 3) {
writer.writeAttribute("alpha", ((RGBA) ls.getColor()).getAlphaFloat());
}
writer.writeEndElement();
writer.writeEndElement();
writer.writeEndElement(); //SolidColor
writer.writeEndElement(); //fill
writer.writeEndElement(); //SolidStroke
}
private static void convertLineStyle(HashMap<Integer, CharacterTag> characters, LINESTYLE2 ls, int shapeNum, XFLXmlWriter writer) throws XMLStreamException {
private static void convertLineStyle2(MATRIX mat, HashMap<Integer, CharacterTag> characters, LINESTYLE2 ls, int shapeNum, XFLXmlWriter writer) throws XMLStreamException {
writer.writeStartElement("SolidStroke", new String[]{"weight", Double.toString(((float) ls.width) / SWF.unitDivisor)});
if (ls.pixelHintingFlag) {
writer.writeAttribute("pixelHinting", true);
@@ -418,7 +433,7 @@ public class XFLConverter {
writer.writeEndElement();
} else {
convertFillStyle(null/* FIXME */, characters, ls.fillType, shapeNum, writer);
convertFillStyle(mat, characters, ls.fillType, shapeNum, writer);
}
writer.writeEndElement();
@@ -426,10 +441,9 @@ public class XFLConverter {
}
private static void convertFillStyle(MATRIX mat, HashMap<Integer, CharacterTag> characters, FILLSTYLE fs, int shapeNum, XFLXmlWriter writer) throws XMLStreamException {
/* todo: use matrix
if (mat == null) {
mat = new MATRIX();
}*/
if (mat == null) {
mat = new MATRIX();
}
//ret.append("<FillStyle index=\"").append(index).append("\">");
switch (fs.fillStyleType) {
case FILLSTYLE.SOLID:
@@ -461,8 +475,10 @@ public class XFLConverter {
writer.writeAttribute("bitmapIsClipped", true);
}
writer.writeStartElement("matrix");
convertMatrix(fs.bitmapMatrix, writer);
writer.writeStartElement("matrix");
MATRIX bitmapMatrix = fs.bitmapMatrix;
bitmapMatrix = (new Matrix(mat)).concatenate(new Matrix(bitmapMatrix)).toMATRIX();
convertMatrix(bitmapMatrix, writer);
writer.writeEndElement();
writer.writeEndElement();
break;
@@ -512,7 +528,11 @@ public class XFLConverter {
}
writer.writeStartElement("matrix");
convertMatrix(fs.gradientMatrix, writer);
MATRIX gradientMatrix = fs.gradientMatrix;
gradientMatrix = (new Matrix(mat)).concatenate(new Matrix(gradientMatrix)).toMATRIX();
convertMatrix(gradientMatrix, writer);
writer.writeEndElement();
GRADRECORD[] records;
if (fs.fillStyleType == FILLSTYLE.FOCAL_RADIAL_GRADIENT) {
@@ -793,14 +813,14 @@ public class XFLConverter {
if (shapeNum <= 3 && lineStyles.lineStyles != null) {
for (int l = 0; l < lineStyles.lineStyles.length; l++) {
strokesStr.writeStartElement("StrokeStyle", new String[]{"index", Integer.toString(lineStyleCount + 1)});
convertLineStyle(lineStyles.lineStyles[l], shapeNum, strokesStr);
convertLineStyle1(lineStyles.lineStyles[l], shapeNum, strokesStr);
strokesStr.writeEndElement();
lineStyleCount++;
}
} else if (lineStyles.lineStyles2 != null) {
for (int l = 0; l < lineStyles.lineStyles2.length; l++) {
strokesStr.writeStartElement("StrokeStyle", new String[]{"index", Integer.toString(lineStyleCount + 1)});
convertLineStyle(characters, (LINESTYLE2) lineStyles.lineStyles2[l], shapeNum, strokesStr);
convertLineStyle2(mat, characters, (LINESTYLE2) lineStyles.lineStyles2[l], shapeNum, strokesStr);
strokesStr.writeEndElement();
lineStyleCount++;
}
@@ -855,7 +875,7 @@ public class XFLConverter {
currentLayer.writeAttribute("strokeStyle", strokeStyle);
}
StringBuilder edgesSb = new StringBuilder();
convertShapeEdges(((fillStyle0 > 0 || fillStyle1 > 0) && morphshape), startEdgeX, startEdgeY, mat, edges, edgesSb);
convertShapeEdges(((fillStyle0 > 0 || fillStyle1 > 0) && morphshape), startEdgeX, startEdgeY, mat, edges, edgesSb, morphshape);
currentLayer.writeAttribute("edges", edgesSb.toString());
currentLayer.writeEndElement();
hasEdge = true;
@@ -887,14 +907,14 @@ public class XFLConverter {
if (shapeNum <= 3) {
for (int l = 0; l < scr.lineStyles.lineStyles.length; l++) {
strokesNewStr.writeStartElement("StrokeStyle", new String[]{"index", Integer.toString(lineStyleCount + 1)});
convertLineStyle(scr.lineStyles.lineStyles[l], shapeNum, strokesNewStr);
convertLineStyle1(scr.lineStyles.lineStyles[l], shapeNum, strokesNewStr);
strokesNewStr.writeEndElement();
lineStyleCount++;
}
} else {
for (int l = 0; l < scr.lineStyles.lineStyles2.length; l++) {
strokesNewStr.writeStartElement("StrokeStyle", new String[]{"index", Integer.toString(lineStyleCount + 1)});
convertLineStyle(characters, (LINESTYLE2) scr.lineStyles.lineStyles2[l], shapeNum, strokesNewStr);
convertLineStyle2(mat, characters, (LINESTYLE2) scr.lineStyles.lineStyles2[l], shapeNum, strokesNewStr);
strokesNewStr.writeEndElement();
lineStyleCount++;
}
@@ -942,7 +962,7 @@ public class XFLConverter {
currentLayer.writeAttribute("strokeStyle", lastStrokeStyle);
}
StringBuilder edgesSb = new StringBuilder();
convertShapeEdges(((lastFillStyle0 > 0 || lastFillStyle1 > 0) && morphshape), startEdgeX, startEdgeY, mat, edges, edgesSb);
convertShapeEdges(((lastFillStyle0 > 0 || lastFillStyle1 > 0) && morphshape), startEdgeX, startEdgeY, mat, edges, edgesSb, morphshape);
currentLayer.writeAttribute("edges", edgesSb.toString());
currentLayer.writeEndElement();
hasEdge = true;
@@ -970,7 +990,7 @@ public class XFLConverter {
currentLayer.writeAttribute("strokeStyle", strokeStyle);
}
StringBuilder edgesSb = new StringBuilder();
convertShapeEdges(((fillStyle0 > 0 || fillStyle1 > 0) && morphshape), startEdgeX, startEdgeY, mat, edges, edgesSb);
convertShapeEdges(((fillStyle0 > 0 || fillStyle1 > 0) && morphshape), startEdgeX, startEdgeY, mat, edges, edgesSb, morphshape);
currentLayer.writeAttribute("edges", edgesSb.toString());
currentLayer.writeEndElement();
hasEdge = true;
@@ -1546,21 +1566,27 @@ public class XFLConverter {
return date.getTime() / 1000;
}
private void convertLibrary(SWF swf, Map<Integer, String> characterVariables, Map<Integer, String> characterClasses, Map<Integer, ScriptPack> characterScriptPacks, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, HashMap<Integer, CharacterTag> characters, HashMap<String, byte[]> files, HashMap<String, byte[]> datfiles, FLAVersion flaVersion, XFLXmlWriter writer) throws XMLStreamException {
private void convertLibrary(SWF swf, Map<Integer, String> characterVariables, Map<Integer, String> characterClasses, Map<Integer, ScriptPack> characterScriptPacks, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, HashMap<Integer, CharacterTag> characters, HashMap<String, byte[]> files, HashMap<String, byte[]> datfiles, FLAVersion flaVersion, XFLXmlWriter writer, Map<PlaceObjectTypeTag, MultiLevelClip> placeToMaskedSymbol) throws XMLStreamException {
//TODO: Imported assets
//linkageImportForRS="true" linkageIdentifier="xxx" linkageURL="yyy.swf"
convertMedia(swf, characterVariables, characterClasses, nonLibraryShapes, backgroundColor, tags, characters, files, datfiles, flaVersion, writer);
convertSymbols(swf, characterVariables, characterClasses, characterScriptPacks, nonLibraryShapes, backgroundColor, tags, characters, files, datfiles, flaVersion, writer);
convertSymbols(swf, characterVariables, characterClasses, characterScriptPacks, nonLibraryShapes, backgroundColor, tags, characters, files, datfiles, flaVersion, writer, placeToMaskedSymbol);
}
private void convertSymbols(SWF swf, Map<Integer, String> characterVariables, Map<Integer, String> characterClasses, Map<Integer, ScriptPack> characterScriptPacks, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, HashMap<Integer, CharacterTag> characters, HashMap<String, byte[]> files, HashMap<String, byte[]> datfiles, FLAVersion flaVersion, XFLXmlWriter writer) throws XMLStreamException {
boolean hasSymbol = false;
private void convertSymbols(SWF swf, Map<Integer, String> characterVariables, Map<Integer, String> characterClasses, Map<Integer, ScriptPack> characterScriptPacks, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, HashMap<Integer, CharacterTag> characters, HashMap<String, byte[]> files, HashMap<String, byte[]> datfiles, FLAVersion flaVersion, XFLXmlWriter writer, Map<PlaceObjectTypeTag, MultiLevelClip> placeToMaskedSymbol) throws XMLStreamException {
boolean hasSymbol = false;
Reference<Integer> nextClipId = new Reference<>(-1);
writer.writeStartElement("symbols");
for (int ch : characters.keySet()) {
CharacterTag symbol = characters.get(ch);
if ((symbol instanceof ShapeTag) && nonLibraryShapes.contains(symbol.getCharacterId())) {
continue; //shapes with 1 ocurrence and single layer are not added to library
}
/*if (!hasSymbol) {
}*/
if ((symbol instanceof ShapeTag) || (symbol instanceof DefineSpriteTag) || (symbol instanceof ButtonTag)) {
XFLXmlWriter symbolStr = new XFLXmlWriter();
@@ -1760,7 +1786,10 @@ public class XFLConverter {
continue;
}
final ScriptPack spriteScriptPack = characterScriptPacks.containsKey(sprite.spriteId) ? characterScriptPacks.get(sprite.spriteId) : null;
convertTimeline(swf.getAbcIndex(), sprite.spriteId, characterVariables.get(sprite.spriteId), nonLibraryShapes, backgroundColor, tags, sprite.getTags(), characters, "Symbol " + symbol.getCharacterId(), flaVersion, files, symbolStr, spriteScriptPack);
extractMultilevelClips(sprite.getTags(), writer, swf, nextClipId, nonLibraryShapes, backgroundColor, characters, flaVersion, files, placeToMaskedSymbol);
convertTimeline(swf.getAbcIndex(), sprite.spriteId, characterVariables.get(sprite.spriteId), nonLibraryShapes, backgroundColor, tags, sprite.getTags(), characters, "Symbol " + symbol.getCharacterId(), flaVersion, files, symbolStr, spriteScriptPack, placeToMaskedSymbol);
} else if (symbol instanceof ShapeTag) {
symbolStr.writeStartElement("timeline");
@@ -1781,11 +1810,7 @@ public class XFLConverter {
symbolStr.writeEndElement(); // DOMSymbolItem
String symbolStr2 = prettyFormatXML(symbolStr.toString());
String symbolFile = "Symbol " + symbol.getCharacterId() + ".xml";
files.put(symbolFile, Utf8Helper.getBytes(symbolStr2));
if (!hasSymbol) {
writer.writeStartElement("symbols");
}
files.put(symbolFile, Utf8Helper.getBytes(symbolStr2));
// write symbLink
writer.writeStartElement("Include", new String[]{"href", symbolFile});
@@ -1802,9 +1827,11 @@ public class XFLConverter {
}
}
if (hasSymbol) {
writer.writeEndElement();
}
extractMultilevelClips(swf.getTags(), writer, swf, nextClipId, nonLibraryShapes, backgroundColor, characters, flaVersion, files, placeToMaskedSymbol);
/*if (hasSymbol) {
}*/
writer.writeEndElement();
}
private void convertMedia(SWF swf, Map<Integer, String> characterVariables, Map<Integer, String> characterClasses, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, HashMap<Integer, CharacterTag> characters, HashMap<String, byte[]> files, HashMap<String, byte[]> datfiles, FLAVersion flaVersion, XFLXmlWriter writer) throws XMLStreamException {
@@ -3051,8 +3078,348 @@ public class XFLConverter {
ret.add(0, varName);
return String.join(".", ret);
}
private void addExtractedClip(
ReadOnlyTagList timelineTags,
XFLXmlWriter writer,
SWF swf,
Reference<Integer> nextClipId,
List<Integer> nonLibraryShapes,
String backgroundColor,
HashMap<Integer, CharacterTag> characters,
FLAVersion flaVersion,
HashMap<String, byte[]> files,
Map<PlaceObjectTypeTag, MultiLevelClip> placeToMaskedSymbol
) throws XMLStreamException {
XFLXmlWriter symbolStr = new XFLXmlWriter();
private void convertTimeline(AbcIndexing abcIndex, int spriteId, String linkageIdentifier, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, ReadOnlyTagList timelineTags, HashMap<Integer, CharacterTag> characters, String name, FLAVersion flaVersion, HashMap<String, byte[]> files, XFLXmlWriter writer, ScriptPack scriptPack) throws XMLStreamException {
if (nextClipId.getVal() < 0) {
nextClipId.setVal(swf.getNextCharacterId());
} else {
nextClipId.setVal(nextClipId.getVal() + 1);
}
int objectId = nextClipId.getVal();
symbolStr.writeStartElement("DOMSymbolItem", new String[]{
"xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance",
"xmlns", "http://ns.adobe.com/xfl/2008/",
"name", generateMaskedSymbolName(objectId),
"lastModified", Long.toString(getTimestamp(swf))});
symbolStr.writeAttribute("symbolType", "graphic");
convertTimeline(swf.getAbcIndex(), objectId, "", nonLibraryShapes, backgroundColor, timelineTags, timelineTags, characters, generateMaskedSymbolName(objectId), flaVersion, files, symbolStr, null, placeToMaskedSymbol);
symbolStr.writeEndElement(); // DOMSymbolItem
String symbolStr2 = prettyFormatXML(symbolStr.toString());
String symbolFile = generateMaskedSymbolName(objectId) + ".xml";
files.put(symbolFile, Utf8Helper.getBytes(symbolStr2));
writer.writeStartElement("Include", new String[]{"href", symbolFile});
writer.writeAttribute("itemIcon", "1");
writer.writeAttribute("loadImmediate", false);
if (flaVersion.ordinal() >= FLAVersion.CS5_5.ordinal()) {
writer.writeAttribute("lastModified", getTimestamp(swf));
//TODO: itemID="518de416-00000341"
}
writer.writeEndElement();
extractMultilevelClips(timelineTags, writer, swf, nextClipId, nonLibraryShapes, backgroundColor, characters, flaVersion, files, placeToMaskedSymbol);
}
private String generateMaskedSymbolName(int symbolId) {
return (DEBUG_EXPORT_LAYER_DEPTHS ? "MaskedSymbol " : "Symbol ") + symbolId;
}
private void extractMultilevelClips(ReadOnlyTagList timelineTags,
XFLXmlWriter writer,
SWF swf,
Reference<Integer> nextClipId,
List<Integer> nonLibraryShapes,
String backgroundColor,
HashMap<Integer, CharacterTag> characters,
FLAVersion flaVersion,
HashMap<String, byte[]> files,
Map<PlaceObjectTypeTag, MultiLevelClip> placeToMaskedSymbol
) throws XMLStreamException {
int f = 0;
List<PlaceObjectTypeTag> clipPlaces = new ArrayList<>();
Map<Integer, PlaceObjectTypeTag> depthToClipPlace = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> clipFinishFrames = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> clipStartFrames = new HashMap<>();
int maxDepth = getMaxDepth(timelineTags);
Tag lastTag = null;
for (Tag t : timelineTags) {
if (t instanceof ShowFrameTag) {
f++;
}
if (t instanceof PlaceObjectTypeTag) {
PlaceObjectTypeTag po = (PlaceObjectTypeTag) t;
if (po.getClipDepth() > -1) {
clipStartFrames.put(po, f);
clipPlaces.add(po);
if (depthToClipPlace.containsKey(po.getDepth())) {
clipFinishFrames.put(depthToClipPlace.get(po.getDepth()), f - 1);
}
depthToClipPlace.put(po.getDepth(), po);
} else {
if (!po.flagMove() && depthToClipPlace.containsKey(po.getDepth())) {
clipFinishFrames.put(depthToClipPlace.get(po.getDepth()), f - 1);
depthToClipPlace.remove(po.getDepth());
}
}
}
if (t instanceof RemoveTag) {
RemoveTag re = (RemoveTag) t;
if (depthToClipPlace.containsKey(re.getDepth())) {
clipFinishFrames.put(depthToClipPlace.get(re.getDepth()), f - 1);
depthToClipPlace.remove(re.getDepth());
}
}
lastTag = t;
}
if (clipPlaces.isEmpty()) {
return;
}
//Some sprites do not end with ShowFrame:
if (lastTag != null && !(lastTag instanceof ShowFrameTag)) {
f++;
}
int frameCount = f;
if (!depthToClipPlace.isEmpty()) {
for (PlaceObjectTypeTag po : depthToClipPlace.values()) {
clipFinishFrames.put(po, frameCount - 1);
}
}
Map<Integer, List<Integer>> depthToFramesList = new HashMap<>();
for (int d = maxDepth; d >= 0; d--) {
depthToFramesList.put(d, new ArrayList<>());
for (int i = 0; i < frameCount; i++) {
depthToFramesList.get(d).add(i);
}
}
Map<Integer, Map<Integer, List<PlaceObjectTypeTag>>> frameToDepthToClips = new TreeMap<>();
for (f = 0; f < frameCount; f++) {
for (int d = 0; d < maxDepth; d++) {
for (int p = 0; p < clipPlaces.size(); p++) {
PlaceObjectTypeTag po = clipPlaces.get(p);
int startFrame = clipStartFrames.get(po);
int finishFrame = clipFinishFrames.get(po);
if (f >= startFrame && f <= finishFrame) {
if (d >= po.getDepth() && d <= po.getClipDepth()) {
if (!frameToDepthToClips.containsKey(f)) {
frameToDepthToClips.put(f, new TreeMap<>());
}
if (!frameToDepthToClips.get(f).containsKey(d)) {
frameToDepthToClips.get(f).put(d, new ArrayList<>());
}
frameToDepthToClips.get(f).get(d).add(po);
}
}
}
}
}
Set<PlaceObjectTypeTag> delegatedPlaces = new HashSet<>();
for (int fr : frameToDepthToClips.keySet()) {
for (int d : frameToDepthToClips.get(fr).keySet()) {
List<PlaceObjectTypeTag> places = frameToDepthToClips.get(fr).get(d);
if (places.size() > 1) {
depthToFramesList.get(d).remove((Integer) fr);
PlaceObjectTypeTag secondPlace = places.get(1);
if (delegatedPlaces.contains(secondPlace)) {
continue;
}
delegatedPlaces.add(secondPlace);
List<Tag> delegatedTimeline = new ArrayList<>();
f = 0;
boolean removed = false;
int numFrames = 0;
lastTag = null;
Map<Integer, Integer> depthStates = new HashMap<>();
if (nextClipId.getVal() == 134) {
System.err.println("xxx");
}
for (Tag t : timelineTags) {
if (f < fr) {
if (t instanceof PlaceObjectTypeTag) {
PlaceObjectTypeTag place = (PlaceObjectTypeTag) t;
if (depthStates.containsKey(place.getDepth()) && !place.flagMove()) {
continue;
}
if (place.getCharacterId() != -1) {
depthStates.put(place.getDepth(), place.getCharacterId());
}
}
if (t instanceof RemoveTag) {
depthStates.remove(((RemoveTag) t).getDepth());
}
}
if (f >= fr) {
if (t instanceof PlaceObjectTypeTag) {
PlaceObjectTypeTag place = (PlaceObjectTypeTag) t;
if (place.getDepth() == secondPlace.getDepth()) {
if (place.flagMove()) {
removed = false;
} else if (place.getClipDepth() == secondPlace.getClipDepth()) {
removed = false;
delegatedPlaces.add(place);
} else {
removed = true;
}
}
if (!removed && place.getDepth() >= secondPlace.getDepth() && place.getDepth() <= secondPlace.getClipDepth()) {
delegatedTimeline.add(place);
}
}
if (t instanceof RemoveTag) {
RemoveTag rt = (RemoveTag) t;
if (rt.getDepth() == secondPlace.getDepth()) {
removed = true;
}
}
}
lastTag = t;
if (t instanceof ShowFrameTag) {
if (f >= fr) {
delegatedTimeline.add(t);
numFrames++;
}
if (removed) {
break;
}
f++;
}
}
if (!(lastTag instanceof ShowFrameTag)) {
numFrames++;
ShowFrameTag showFrame = new ShowFrameTag(swf);
//set timelined?
delegatedTimeline.add(showFrame);
}
/*
List<Tag> delegatedTimeline2 = Helper.deepCopy(delegatedTimeline);
for (int i = 0; i < delegatedTimeline2.size(); i++) {
delegatedTimeline2.get(i).setSwf(swf);
}
for (Tag t : delegatedTimeline2) {
if (t instanceof PlaceObjectTypeTag) {
PlaceObjectTypeTag place = (PlaceObjectTypeTag) t;
if (depthStates.containsKey(place.getDepth()) && !place.flagMove()) {
continue;
}
if (place.getCharacterId() != -1) {
depthStates.put(place.getDepth(), place.getCharacterId());
}
if (place.flagMove()) {
place.setCharacterId(depthStates.get(place.getDepth()));
place.setPlaceFlagMove(false);
}
}
if (t instanceof RemoveTag) {
depthStates.remove(((RemoveTag)t).getDepth());
}
}
//find shape looping, find largest loop
int found = -1;
loopi: for (int i = numFrames - 1; i >= 1; i--) {
System.err.println("checking len = " + i);
List<Tag> firstBatch = new ArrayList<>();
Map<Integer, Map<Integer, PlaceObjectTypeTag>> firstFramesDepthStates = new HashMap<>();
Map<Integer, PlaceObjectTypeTag> curDepthStates = new LinkedHashMap<>();
f = 0;
for (Tag t : delegatedTimeline2) {
if (t instanceof PlaceObjectTypeTag) {
PlaceObjectTypeTag place = (PlaceObjectTypeTag) t;
curDepthStates.put(place.getDepth(), place);
}
if (t instanceof RemoveTag) {
RemoveTag rem = (RemoveTag) t;
curDepthStates.remove(rem.getDepth());
}
if (t instanceof ShowFrameTag) {
firstFramesDepthStates.put(f, new LinkedHashMap<>(curDepthStates));
f++;
if (f == i) {
break;
}
}
}
int numParts = (int) Math.ceil(numFrames / (float) i); //example 4
if (numParts < 2) {
continue;
}
f = 0;
curDepthStates = new LinkedHashMap<>();
boolean same = true;
loopt: for (Tag t : delegatedTimeline2) {
if (t instanceof PlaceObjectTypeTag) {
PlaceObjectTypeTag place = (PlaceObjectTypeTag) t;
curDepthStates.put(place.getDepth(), place);
}
if (t instanceof RemoveTag) {
RemoveTag rem = (RemoveTag) t;
curDepthStates.remove(rem.getDepth());
}
if (t instanceof ShowFrameTag) {
int firstF = f % i;
Map<Integer, PlaceObjectTypeTag> firstFDepthStates = firstFramesDepthStates.get(firstF);
if (firstFDepthStates.size() == curDepthStates.size()) {
for (int k : curDepthStates.keySet()) {
if (!firstFDepthStates.containsKey(k)) {
same = false;
break loopt;
}
PlaceObjectTypeTag p1 = firstFDepthStates.get(k);
PlaceObjectTypeTag p2 = curDepthStates.get(k);
if (!p1.placeEquals(p2)) {
same = false;
break loopt;
}
}
} else {
same = false;
break loopt;
}
f++;
}
}
if (same) {
System.err.println("same");
found = f;
}
}
System.err.println("clip repeats in " + found);*/
addExtractedClip(new ReadOnlyTagList(delegatedTimeline), writer, swf, nextClipId, nonLibraryShapes, backgroundColor, characters, flaVersion, files, placeToMaskedSymbol);
placeToMaskedSymbol.put(secondPlace, new MultiLevelClip(secondPlace, nextClipId.getVal(), numFrames));
}
}
}
}
private void convertTimeline(AbcIndexing abcIndex, int spriteId, String linkageIdentifier, List<Integer> nonLibraryShapes, String backgroundColor, ReadOnlyTagList tags, ReadOnlyTagList timelineTags, HashMap<Integer, CharacterTag> characters, String name, FLAVersion flaVersion, HashMap<String, byte[]> files, XFLXmlWriter writer, ScriptPack scriptPack, Map<PlaceObjectTypeTag, MultiLevelClip> placeToMaskedSymbol) throws XMLStreamException {
List<String> classNames = new ArrayList<>();
//Searches for Object.registerClass("linkageIdentifier",mypkg.MyClass);
@@ -3151,7 +3518,10 @@ public class XFLConverter {
Map<Integer, PlaceObjectTypeTag> depthToClipPlace = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> clipFinishFrames = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> clipStartFrames = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> placeToFirstCharacterDepth = new HashMap<>();
Tag lastTag = null;
int tpos = 0;
for (Tag t : timelineTags) {
if (t instanceof ShowFrameTag) {
f++;
@@ -3160,8 +3530,28 @@ public class XFLConverter {
PlaceObjectTypeTag po = (PlaceObjectTypeTag) t;
if (po.getClipDepth() > -1) {
clipFrameSplitters.add(f);
clipStartFrames.put(po, f);
clipPlaces.add(po);
depthToClipPlace.put(po.getDepth(), po);
if (depthToClipPlace.containsKey(po.getDepth())) {
clipFinishFrames.put(depthToClipPlace.get(po.getDepth()), f - 1);
}
depthToClipPlace.put(po.getDepth(), po);
for (int j = tpos + 1; j <= timelineTags.size(); j++) {
Tag t2 = timelineTags.get(j);
if (t2 instanceof PlaceObject2Tag) {
PlaceObject2Tag pl = (PlaceObject2Tag) t2;
int d = pl.getDepth();
if (d >= po.getDepth() && d <= po.getClipDepth()) {
placeToFirstCharacterDepth.put(po, d);
}
}
if (t2 instanceof ShowFrameTag) {
break;
}
}
} else {
if (!po.flagMove() && depthToClipPlace.containsKey(po.getDepth())) {
clipFinishFrames.put(depthToClipPlace.get(po.getDepth()), f - 1);
@@ -3177,6 +3567,7 @@ public class XFLConverter {
}
}
lastTag = t;
tpos++;
}
//Some sprites do not end with ShowFrame:
@@ -3207,33 +3598,207 @@ public class XFLConverter {
depthToFramesList.get(d).add(i);
}
}
for (int d = maxDepth; d >= 0; d--) {
Map<Integer, Map<Integer, List<PlaceObjectTypeTag>>> frameToDepthToClips = new TreeMap<>();
/*if (spriteId == 116) {
System.err.println("xxx");
}*/
for (f = 0; f < frameCount; f++) {
for (int d = 0; d < maxDepth; d++) {
for (int p = 0; p < clipPlaces.size() - 1; p++) {
PlaceObjectTypeTag po = clipPlaces.get(p);
if (po == null) {
continue;
}
int startFrame = clipStartFrames.get(po);
int finishFrame = clipFinishFrames.get(po);
if (f >= startFrame && f <= finishFrame) {
if (d >= po.getDepth() && d <= po.getClipDepth()) {
if (!frameToDepthToClips.containsKey(f)) {
frameToDepthToClips.put(f, new TreeMap<>());
}
if (!frameToDepthToClips.get(f).containsKey(d)) {
frameToDepthToClips.get(f).put(d, new ArrayList<>());
}
frameToDepthToClips.get(f).get(d).add(po);
}
}
}
}
}
Set<PlaceObjectTypeTag> multiLevelsPlaces = new HashSet<>();
Set<PlaceObjectTypeTag> secondLevelPlaces = new HashSet<>();
Map<PlaceObjectTypeTag, PlaceObjectTypeTag> secondToFirstLevelPlace = new HashMap<>();
for (int fr : frameToDepthToClips.keySet()) {
for (int d : frameToDepthToClips.get(fr).keySet()) {
List<PlaceObjectTypeTag> places = frameToDepthToClips.get(fr).get(d);
if (places.size() > 1) {
//depthToFramesList.get(d).remove((Integer) fr);
for (int i = 1; i < places.size(); i++) {
multiLevelsPlaces.add(places.get(i));
}
secondLevelPlaces.add(places.get(1));
secondToFirstLevelPlace.put(places.get(1), places.get(0));
}
}
}
for (int p = 0; p < clipPlaces.size() - 1; p++) {
Set<PlaceObjectTypeTag> handledClips = new HashSet<>();
for (int d = maxDepth; d >= 0; d--) {
loopp: for (int p = 0; p < clipPlaces.size() - 1; p++) {
PlaceObjectTypeTag po = clipPlaces.get(p);
/* if (po != null && po.getClipDepth() == d && secondLevelPlaces.contains(po)) {
int clipFrame = clipFrameSplitters.get(p);
int nextFrame = clipFinishFrames.get(po);
continue;
}*/
if (po != null && multiLevelsPlaces.contains(po)) {
continue;
}
if (po != null && handledClips.contains(po)) {
continue;
}
if (po != null && po.getClipDepth() == d) {
int clipFrame = clipFrameSplitters.get(p);
int nextFrame = clipFinishFrames.get(po);
int nextFrame = clipFinishFrames.get(po);
handledClips.add(po);
int lastFrame = nextFrame;
for (int p2 = 0; p2 < clipPlaces.size() - 1; p2++) {
PlaceObjectTypeTag po2 = clipPlaces.get(p2);
if (po2 == null) {
continue;
}
int clipFrame2 = clipFrameSplitters.get(p2);
int nextFrame2 = clipFinishFrames.get(po2);
if (lastFrame + 1 == clipFrame2
&& po.getDepth() == po2.getDepth()
&& po.getClipDepth() == po2.getClipDepth()
&& !multiLevelsPlaces.contains(po2)
) {
lastFrame = nextFrame2;
handledClips.add(po2);
}
}
writer.writeStartElement("DOMLayer", new String[]{
"name", "Layer " + (index + 1) + (DEBUG_EXPORT_LAYER_DEPTHS ? " (depth " + po.getDepth() + " clipdepth:" + po.getClipDepth() + ")" : ""),
"color", randomOutlineColor(),
"layerType", "mask",
"locked", "true"});
convertFrames(null, clipFrame, nextFrame, "", "", nonLibraryShapes, tags, timelineTags, characters, po.getDepth(), flaVersion, files, writer);
convertFrames(depthToFramesList.get(po.getDepth()), clipFrame, lastFrame, "", "", nonLibraryShapes, tags, timelineTags, characters, po.getDepth(), flaVersion, files, writer);
writer.writeEndElement();
int parentIndex = index;
index++;
for (int nd = po.getClipDepth() - 1; nd > po.getDepth(); nd--) {
boolean nonEmpty = writeLayer(index, depthToFramesList.get(nd), nd, clipFrame, nextFrame, parentIndex, writer, nonLibraryShapes, tags, timelineTags, characters, flaVersion, files);
for (int i = clipFrame; i <= nextFrame; i++) {
//Set<PlaceObjectTypeTag> processedClips = new HashSet<>();
for (int fx = clipFrame; fx <= lastFrame; fx++) {
for (int nd = po.getClipDepth() - 1; nd > po.getDepth(); nd--) {
if (!depthToFramesList.containsKey(nd) || !depthToFramesList.get(nd).contains(fx)) {
continue;
}
if (frameToDepthToClips.containsKey(fx)
&& frameToDepthToClips.get(fx).containsKey(nd)) {
List<PlaceObjectTypeTag> clips = frameToDepthToClips.get(fx).get(nd);
if (clips.size() > 1) {
PlaceObjectTypeTag po2 = clips.get(1);
if (handledClips.contains(po2)) {
continue;
}
handledClips.add(po2);
MultiLevelClip mlc = placeToMaskedSymbol.get(po2);
writer.writeStartElement("DOMLayer", new String[]{
"name", "Layer " + (index + 1) + (DEBUG_EXPORT_LAYER_DEPTHS ? " (depth " + po2.getDepth() + " clipdepth:" + po2.getClipDepth() + " maskedid:" + mlc.symbol + ")" : ""),
"color", randomOutlineColor(),
"parentLayerIndex", "" + parentIndex,
"locked", "true"
});
writer.writeStartElement("frames");
int clipFrame2 = 0;
for (int p2 = 0; p2 < clipPlaces.size() - 1; p2++) {
if (clipPlaces.get(p2) == po2) {
clipFrame2 = clipFrameSplitters.get(p2);
}
}
//int nextFrame2 = clipFinishFrames.get(po2);
if (clipFrame2 > 0) {
writer.writeStartElement("DOMFrame", new String[]{
"index", "0",
"duration", "" + clipFrame2,
"keyMode", "" + KEY_MODE_NORMAL
});
writer.writeEmptyElement("elements");
writer.writeEndElement();
}
if (mlc.symbol == 135) {
System.err.println("xxx");
}
writer.writeStartElement("DOMFrame", new String[]{
"index", "" + clipFrame2,
"duration", "" + mlc.numFrames,
"keyMode", "" + KEY_MODE_NORMAL
});
writer.writeStartElement("elements");
writer.writeStartElement("DOMSymbolInstance", new String[]{
"libraryItemName", generateMaskedSymbolName(mlc.symbol),
"symbolType", "graphic",
"loop", "loop"
});
writer.writeStartElement("matrix");
convertMatrix(new MATRIX(), writer);
writer.writeEndElement(); //matrix
writer.writeStartElement("transformationPoint");
writer.writeEmptyElement("Point");
writer.writeEndElement(); //transformationPoint
writer.writeEndElement(); //DOMSymbolInstance
writer.writeEndElement(); //elements
writer.writeEndElement(); //DOMFrame
writer.writeEndElement(); //frames
writer.writeEndElement();
index++;
for (int nd2 = po2.getDepth(); nd2 <= po2.getClipDepth(); nd2++) {
for (int i = clipFrame2; i < clipFrame2 + mlc.numFrames; i++) {
depthToFramesList.get(nd2).remove((Integer) i);
}
}
}
}
}
}
for (int nd = po.getClipDepth() - 1; nd > po.getDepth(); nd--) {
boolean nonEmpty = writeLayer(index, depthToFramesList.get(nd), nd, clipFrame, lastFrame, parentIndex, writer, nonLibraryShapes, tags, timelineTags, characters, flaVersion, files);
for (int i = clipFrame; i <= lastFrame; i++) {
depthToFramesList.get(nd).remove((Integer) i);
}
if (nonEmpty) {
index++;
}
}
for (int i = clipFrame; i <= nextFrame; i++) {
for (int i = clipFrame; i <= lastFrame; i++) {
depthToFramesList.get(po.getDepth()).remove((Integer) i);
}
}
@@ -3842,12 +4407,14 @@ public class XFLConverter {
domDocument.writeAttribute("height", doubleToString(height));
}
convertFonts(characterClasses, swf.getTags(), domDocument);
convertLibrary(swf, characterVariables, characterClasses, characterScriptPacks, nonLibraryShapes, backgroundColor, swf.getTags(), characters, files, datfiles, flaVersion, domDocument);
Map<PlaceObjectTypeTag, MultiLevelClip> placeToMaskedSymbol = new HashMap<>();
convertFonts(characterClasses, swf.getTags(), domDocument);
convertLibrary(swf, characterVariables, characterClasses, characterScriptPacks, nonLibraryShapes, backgroundColor, swf.getTags(), characters, files, datfiles, flaVersion, domDocument, placeToMaskedSymbol);
//domDocument.writeStartElement("timelines");
ScriptPack documentScriptPack = characterScriptPacks.containsKey(0) ? characterScriptPacks.get(0) : null;
convertTimeline(swf.getAbcIndex(), -1, null, nonLibraryShapes, backgroundColor, swf.getTags(), swf.getTags(), characters, "Scene 1", flaVersion, files, domDocument, documentScriptPack);
convertTimeline(swf.getAbcIndex(), -1, null, nonLibraryShapes, backgroundColor, swf.getTags(), swf.getTags(), characters, "Scene 1", flaVersion, files, domDocument, documentScriptPack, placeToMaskedSymbol);
//domDocument.writeEndElement();
if (hasAmfMetadata) {
@@ -4624,4 +5191,16 @@ public class XFLConverter {
}
}
}
private class MultiLevelClip {
public PlaceObjectTypeTag startClipPlaceTag;
public int symbol;
public int numFrames;
public MultiLevelClip(PlaceObjectTypeTag startClipPlaceTag, int symbol, int numFrames) {
this.startClipPlaceTag = startClipPlaceTag;
this.symbol = symbol;
this.numFrames = numFrames;
}
}
}

View File

@@ -17,12 +17,13 @@
package com.jpexs.helpers;
import com.jpexs.decompiler.flash.SWFInputStream;
import java.io.Serializable;
/**
*
* @author JPEXS
*/
public class ByteArrayRange {
public class ByteArrayRange implements Serializable {
public static final ByteArrayRange EMPTY = new ByteArrayRange(SWFInputStream.BYTE_ARRAY_EMPTY);

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>nested_masks</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="nested_masks" align="middle">
<param name="movie" value="nested_masks.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="nested_masks.swf" width="550" height="400">
<param name="movie" value="nested_masks.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>

Binary file not shown.

View File

@@ -0,0 +1,146 @@
<DOMDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" currentTimeline="1" xflVersion="2.2" creatorInfo="Adobe Flash Professional CS6" platform="Windows" versionInfo="Saved by Adobe Flash Windows 12.0 build 481" majorVersion="12" buildNumber="481" nextSceneIdentifier="2" playOptionsPlayLoop="false" playOptionsPlayPages="false" playOptionsPlayFrameActions="false" autoSaveHasPrompted="true">
<symbols>
<Include href="Rectangles.xml" itemIcon="1" loadImmediate="false" itemID="653d38ae-000001d5" lastModified="1698561460"/>
</symbols>
<timelines>
<DOMTimeline name="Scene 1" currentFrame="11">
<layers>
<DOMLayer name="Layer 4" color="#FF4FFF">
<frames>
<DOMFrame index="0" duration="12" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#999999"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="!1819 5421|4078 5421!4078 5421|4078 7680!4078 7680|1819 7680!1819 7680|1819 5421"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 2" color="#9933CC" locked="true" layerType="mask">
<frames>
<DOMFrame index="0" duration="12" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="!7618 6595.5[#1ACC.A6 #1CB5.3F 5411 7104.5!5411 7104.5[#F79.1C #1ACB.EB 3100 6214!3100 6214[2239 5571 2239 4660!2239 4660[2239 3749 3100 3103!3100 3103[#F78.E8 #99C.06 5516.5 2150.5!5516.5 2150.5[#1BA0.48 #730.EE 7738 2664.5!7738 2664.5
[#20D3.A8 #DA0.23 8389.5 4665!8389.5 4665[#20B7.72 #16D1.BB 7618 6595.5"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 5" color="#4FFFFF" parentLayerIndex="1" locked="true">
<frames>
<DOMFrame index="0" duration="12" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#99FF66"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="
!5499 2520|5499 4040!5499 4040|2579 4040!2579 4040|2579 2520!2579 2520|5499 2520"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 1" color="#4FFF4F" parentLayerIndex="1" locked="true" current="true" isSelected="true">
<frames>
<DOMFrame index="0" keyMode="9728">
<elements>
<DOMSymbolInstance libraryItemName="Rectangles" symbolType="graphic" loop="loop">
<matrix>
<Matrix tx="149.95" ty="100"/>
</matrix>
<transformationPoint>
<Point x="108.5" y="88.5"/>
</transformationPoint>
</DOMSymbolInstance>
</elements>
</DOMFrame>
<DOMFrame index="1" duration="11" keyMode="9728">
<elements>
<DOMSymbolInstance libraryItemName="Rectangles" symbolType="graphic" loop="loop">
<matrix>
<Matrix tx="128.95" ty="100"/>
</matrix>
<transformationPoint>
<Point x="108.5" y="88.5"/>
</transformationPoint>
</DOMSymbolInstance>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 6" color="#808080" parentLayerIndex="1" locked="true">
<frames>
<DOMFrame index="0" duration="12" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#99FFFF"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="
!8049 5660|8049 6890!8049 6890|6819 6890!6819 6890|6819 5660!6819 5660|8049 5660"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 3" color="#FF800A">
<frames>
<DOMFrame index="0" duration="12" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#0000FF"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="
!9319 2460|9319 4640!9319 4640|7139 4640!7139 4640|7139 2460!7139 2460|9319 2460"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
</layers>
</DOMTimeline>
</timelines>
<PrinterSettings/>
<publishHistory>
<PublishItem publishSize="1659" publishTime="1698561475"/>
<PublishItem publishSize="1671" publishTime="1698553381"/>
<PublishItem publishSize="1673" publishTime="1698535285"/>
<PublishItem publishSize="1472" publishTime="1698534831"/>
<PublishItem publishSize="1342" publishTime="1698527844"/>
<PublishItem publishSize="1338" publishTime="1698523920"/>
<PublishItem publishSize="1261" publishTime="1698514052"/>
<PublishItem publishSize="1183" publishTime="1698513796"/>
<PublishItem publishSize="1098" publishTime="1698511659"/>
<PublishItem publishSize="723" publishTime="1698511153"/>
</publishHistory>
</DOMDocument>

View File

@@ -0,0 +1,197 @@
<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="Rectangles" itemID="653d38ae-000001d5" symbolType="graphic" lastModified="1698561460">
<timeline>
<DOMTimeline name="Rectangles" currentFrame="3">
<layers>
<DOMLayer name="Layer 7" color="#4F80FF">
<frames>
<DOMFrame index="0" duration="4" keyMode="15872">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#9900FF"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="!3860 -700|3860 600!3860 600|1960 600!1960 600|1960 -700!1960 -700|3860 -700"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 4" color="#FF4FFF" locked="true" layerType="mask">
<frames>
<DOMFrame index="0" duration="4" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="!3400 2240S2|3400 5859!3400 5859|680 5859!680 5859|680 2240!680 2240|3400 2240"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 3" color="#FF800A" parentLayerIndex="1" locked="true" current="true" isSelected="true">
<frames>
<DOMFrame index="0" duration="3" tweenType="shape" keyMode="17922">
<MorphShape>
<morphSegments>
<MorphSegment startPointA="-2.109375, #10.0E" startPointB="-4.765625, #11.B2" strokeIndex1="0" strokeIndex2="0" fillIndex1="0" fillIndex2="0">
<MorphCurves controlPointA="-2.109375, #E.19" anchorPointA="#FFFFFF.9B, #C.B6" controlPointB="-4.765625, #F.BD" anchorPointB="#FFFFFC.F3, #E.5A"/>
<MorphCurves controlPointA="#1.53, #B.54" anchorPointA="3.75, #B.54" controlPointB="#FFFFFE.AB, #C.F8" anchorPointB="#1.18, #C.F8"/>
<MorphCurves controlPointA="#6.2D, #B.54" anchorPointA="#7.E4, #C.B6" controlPointB="#3.85, #C.F8" anchorPointB="#5.3C, #E.5A"/>
<MorphCurves controlPointA="#8.3C, #C.FD" anchorPointA="#8.83, #D.4A" controlPointB="#5.94, #E.A1" anchorPointB="#5.DB, #E.EE"/>
<MorphCurves controlPointA="#8.72, #D.58" anchorPointA="#8.62, #D.66" controlPointB="#5.CA, #E.FC" anchorPointB="#5.BA, #F.0A"/>
<MorphCurves controlPointA="#6.E1, #E.C1" anchorPointA="#6.E1, #10.AB" controlPointB="#4.39, #10.65" anchorPointB="#4.39, #12.4F"/>
<MorphCurves controlPointA="#6.E1, #12.39" anchorPointA="#7.DF, #13.69" controlPointB="#4.39, #13.DD" anchorPointB="#5.37, #15.0D"/>
<MorphCurves controlPointA="#6.2A, #14.C8" anchorPointA="3.75, #14.C8" controlPointB="#3.82, #16.6C" anchorPointB="#1.18, #16.6C"/>
<MorphCurves controlPointA="#1.53, #14.C8" anchorPointA="#FFFFFF.9B, #13.65" controlPointB="#FFFFFE.AB, #16.6C" anchorPointB="#FFFFFC.F3, #15.09"/>
<MorphCurves controlPointA="-2.109375, #12.03" anchorPointA="-2.109375, #10.0E" controlPointB="-4.765625, #13.A7" anchorPointB="-4.765625, #11.B2"/>
</MorphSegment>
<MorphSegment startPointA="#6.E1, #10.AB" startPointB="#4.39, #12.4F" strokeIndex1="0" strokeIndex2="0" fillIndex1="1" fillIndex2="1">
<MorphCurves controlPointA="#6.E1, #E.C1" anchorPointA="#8.62, #D.66" controlPointB="#4.39, #10.65" anchorPointB="#5.BA, #F.0A"/>
<MorphCurves controlPointA="#9.FB, #C.0B" anchorPointA="#C.05, #C.0B" controlPointB="#7.53, #D.AF" anchorPointB="#9.5D, #D.AF"/>
<MorphCurves controlPointA="#E.26, #C.0B" anchorPointA="#F.A7, #D.66" controlPointB="#B.7E, #D.AF" anchorPointB="#C.FF, #F.0A"/>
<MorphCurves controlPointA="#11.29, #E.C1" anchorPointA="#11.29, #10.AB" controlPointB="#E.81, #10.65" anchorPointB="#E.81, #12.4F"/>
<MorphCurves controlPointA="#11.29, #12.95" anchorPointA="#F.A7, #13.F" controlPointB="#E.81, #14.39" anchorPointB="#C.FF, #15.94"/>
<MorphCurves controlPointA="#E.26, #15.4B" anchorPointA="#C.05, #15.4B" controlPointB="#B.7E, #16.EF" anchorPointB="#9.5D, #16.EF"/>
<MorphCurves controlPointA="#9.E4, #15.4B" anchorPointA="#8.62, #13.F" controlPointB="#7.3C, #16.EF" anchorPointB="#5.BA, #15.94"/>
<MorphCurves controlPointA="#8.1A, #13.AF" anchorPointA="#7.DF, #13.69" controlPointB="#5.72, #15.53" anchorPointB="#5.37, #15.0D"/>
<MorphCurves controlPointA="#6.E1, #12.39" anchorPointA="#6.E1, #10.AB" controlPointB="#4.39, #13.DD" anchorPointB="#4.39, #12.4F"/>
</MorphSegment>
</morphSegments>
<morphHintsList/>
</MorphShape>
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#FFFF00"/>
</FillStyle>
<FillStyle index="2">
<SolidColor color="#FF00FF"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle0="1" edges="!2178.5 3402S1[#83B.F5 #CFC.F7 2020 3254!2020 3254[1581 2900 960 2900!960 2900[339 2900 -101 3254!-101 3254[-540 3609 -540 4110!-540 4110[-540 4611 -101 4965!-101 4965[339 5320 960 5320!960 5320[#629.99 5320 2015 4969"/>
<Edge fillStyle0="1" fillStyle1="2" edges="!2015 4969S3[1761 #1239.24 1761 4267!1761 4267[1761 3777 2146 3430!2146 3430[#872.08 #D57.96 2178.5 3402"/>
<Edge fillStyle1="2" edges="!2178.5 3402S2[#9FA.A3 3083 3077 3083!3077 3083[3622 3083 4007 3430!4007 3430[4393 3777 4393 4267!4393 4267[4393 4757 4007 5104!4007 5104[3622 5451 3077 5451!3077 5451[2532 5451 2146 5104!2146 5104[#819.D3 #13AE.F3 2015 4969"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
<DOMFrame index="3" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#FFFF00"/>
</FillStyle>
<FillStyle index="2">
<SolidColor color="#FF00FF"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle0="1" edges="!1499 3822[1428 3745 1340 3674!1340 3674[901 3320 280 3320!280 3320[-341 3320 -781 3674!-781 3674[-1220 4029 -1220 4530!-1220 4530[-1220 5031 -781 5385!-781 5385[-341 5740 280 5740!280 5740[898 5740 1335 5389"/>
<Edge fillStyle0="1" fillStyle1="2" edges="!1335 5389[1081 5085 1081 4687!1081 4687[1081 4197 1466 3850!1466 3850[1482 3836 1499 3822"/>
<Edge fillStyle1="2" edges="!1499 3822[1875 3503 2397 3503!2397 3503[2942 3503 3327 3850!3327 3850[3713 4197 3713 4687!3713 4687[3713 5177 3327 5524!3327 5524[2942 5871 2397 5871!2397 5871[1852 5871 1466 5524!1466 5524[1394 5459 1335 5389"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 6" color="#808080">
<frames>
<DOMFrame index="0" duration="4" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#660000"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="!4053 3585[3852 3731 3567 3731!3567 3731[3282 3731 3081 3585!3081 3585[2880 3440 2880 3235!2880 3235[2880 3030 3081 2884!3081 2884[3282 2739 3567 2739!3567 2739[3852 2739 4053 2884!4053 2884[4254 3030 4254 3235!4254 3235[4254 3440 4053
3585"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 2" color="#9933CC" locked="true" layerType="mask">
<frames>
<DOMFrame index="0" duration="4" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="
!3361 3708S2[2843 4420 2110 4420!2110 4420[1377 4420 858 3708!858 3708[340 2997 340 1990!340 1990[340 983 858 271!858 271[1377 -440 2110 -440!2110 -440[2843 -440 3361 271!3361 271[3880 983 3880 1990!3880 1990[3880 2997 3361 3708"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 1" color="#4FFF4F" parentLayerIndex="4" locked="true">
<frames>
<DOMFrame index="0" duration="4" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#00FF00"/>
</FillStyle>
<FillStyle index="2">
<SolidColor color="#FF0000"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="
!2940 1020|4340 1020!4340 1020|4340 3540!4340 3540|1280 3540!1280 3540|1280 2440"/>
<Edge fillStyle1="2" edges="
!1280 2440|0 2440!0 2440|0 0!0 0|2940 0!2940 0|2940 1020"/>
<Edge fillStyle0="2" fillStyle1="1" edges="
!1280 2440|1280 1020!1280 1020|2940 1020"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
<DOMLayer name="Layer 5" color="#4FFFFF">
<frames>
<DOMFrame index="0" duration="4" keyMode="9728">
<elements>
<DOMShape>
<fills>
<FillStyle index="1">
<SolidColor color="#00FFFF"/>
</FillStyle>
</fills>
<edges>
<Edge fillStyle1="1" edges="
!5440 2420|5440 4240!5440 4240|2880 4240!2880 4240|2880 2420!2880 2420|5440 2420"/>
</edges>
</DOMShape>
</elements>
</DOMFrame>
</frames>
</DOMLayer>
</layers>
</DOMTimeline>
</timeline>
</DOMSymbolItem>

View File

@@ -0,0 +1,67 @@
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:CreatorTool>Adobe Flash Professional CS6 - build 481</xmp:CreatorTool>
<xmp:CreateDate>2023-10-28T09:36:22-07:00</xmp:CreateDate>
<xmp:MetadataDate>2023-10-28T13:59:37-07:00</xmp:MetadataDate>
<xmp:ModifyDate>2023-10-28T13:59:37-07:00</xmp:ModifyDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format>application/vnd.adobe.fla</dc:format>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#">
<xmpMM:InstanceID>xmp.iid:5C24D3E7D475EE119192C59AF2E61FD8</xmpMM:InstanceID>
<xmpMM:DocumentID>xmp.did:237F6284B075EE1181508375819860C6</xmpMM:DocumentID>
<xmpMM:OriginalDocumentID>xmp.did:237F6284B075EE1181508375819860C6</xmpMM:OriginalDocumentID>
<xmpMM:History>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<stEvt:action>created</stEvt:action>
<stEvt:instanceID>xmp.iid:237F6284B075EE1181508375819860C6</stEvt:instanceID>
<stEvt:when>2023-10-28T09:36:22-07:00</stEvt:when>
<stEvt:softwareAgent>Adobe Flash Professional CS6 - build 481</stEvt:softwareAgent>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<stEvt:action>created</stEvt:action>
<stEvt:instanceID>xmp.iid:277F6284B075EE1181508375819860C6</stEvt:instanceID>
<stEvt:when>2023-10-28T09:36:22-07:00</stEvt:when>
<stEvt:softwareAgent>Adobe Flash Professional CS6 - build 481</stEvt:softwareAgent>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<stEvt:action>created</stEvt:action>
<stEvt:instanceID>xmp.iid:5C24D3E7D475EE119192C59AF2E61FD8</stEvt:instanceID>
<stEvt:when>2023-10-28T09:36:22-07:00</stEvt:when>
<stEvt:softwareAgent>Adobe Flash Professional CS6 - build 481</stEvt:softwareAgent>
</rdf:li>
</rdf:Seq>
</xmpMM:History>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

View File

@@ -0,0 +1,206 @@
<flash_profiles>
<flash_profile version="1.0" name="Default" current="true">
<PublishFormatProperties enabled="true">
<defaultNames>1</defaultNames>
<flash>1</flash>
<projectorWin>0</projectorWin>
<projectorMac>0</projectorMac>
<html>1</html>
<gif>0</gif>
<jpeg>0</jpeg>
<png>0</png>
<qt>0</qt>
<rnwk>0</rnwk>
<swc>0</swc>
<flashDefaultName>1</flashDefaultName>
<projectorWinDefaultName>1</projectorWinDefaultName>
<projectorMacDefaultName>1</projectorMacDefaultName>
<htmlDefaultName>1</htmlDefaultName>
<gifDefaultName>1</gifDefaultName>
<jpegDefaultName>1</jpegDefaultName>
<pngDefaultName>1</pngDefaultName>
<qtDefaultName>1</qtDefaultName>
<rnwkDefaultName>1</rnwkDefaultName>
<swcDefaultName>1</swcDefaultName>
<flashFileName>nested_masks.swf</flashFileName>
<projectorWinFileName>nested_masks.exe</projectorWinFileName>
<projectorMacFileName>nested_masks.app</projectorMacFileName>
<htmlFileName>nested_masks.html</htmlFileName>
<gifFileName>nested_masks.gif</gifFileName>
<jpegFileName>nested_masks.jpg</jpegFileName>
<pngFileName>nested_masks.png</pngFileName>
<qtFileName>nested_masks.mov</qtFileName>
<rnwkFileName>nested_masks.smil</rnwkFileName>
<swcFileName>nested_masks.swc</swcFileName>
</PublishFormatProperties>
<PublishHtmlProperties enabled="true">
<VersionDetectionIfAvailable>0</VersionDetectionIfAvailable>
<VersionInfo>12,0,0,0;11,2,0,0;11,1,0,0;10,3,0,0;10,2,153,0;10,1,52,0;9,0,124,0;8,0,24,0;7,0,14,0;6,0,79,0;5,0,58,0;4,0,32,0;3,0,8,0;2,0,1,12;1,0,0,1;</VersionInfo>
<UsingDefaultContentFilename>1</UsingDefaultContentFilename>
<UsingDefaultAlternateFilename>1</UsingDefaultAlternateFilename>
<ContentFilename>nested_masks.xfl_content.html</ContentFilename>
<AlternateFilename>nested_masks.xfl_alternate.html</AlternateFilename>
<UsingOwnAlternateFile>0</UsingOwnAlternateFile>
<OwnAlternateFilename></OwnAlternateFilename>
<Width>550</Width>
<Height>400</Height>
<Align>0</Align>
<Units>0</Units>
<Loop>1</Loop>
<StartPaused>0</StartPaused>
<Scale>0</Scale>
<HorizontalAlignment>1</HorizontalAlignment>
<VerticalAlignment>1</VerticalAlignment>
<Quality>4</Quality>
<DeblockingFilter>0</DeblockingFilter>
<WindowMode>0</WindowMode>
<DisplayMenu>1</DisplayMenu>
<DeviceFont>0</DeviceFont>
<TemplateFileName>C:\Users\MyUser\AppData\Local\Adobe\Flash CS6\en_US\Configuration\HTML\Default.html</TemplateFileName>
<showTagWarnMsg>1</showTagWarnMsg>
</PublishHtmlProperties>
<PublishFlashProperties enabled="true">
<TopDown></TopDown>
<FireFox></FireFox>
<Report>0</Report>
<Protect>0</Protect>
<OmitTraceActions>0</OmitTraceActions>
<Quality>80</Quality>
<DeblockingFilter>0</DeblockingFilter>
<StreamFormat>0</StreamFormat>
<StreamCompress>7</StreamCompress>
<EventFormat>0</EventFormat>
<EventCompress>7</EventCompress>
<OverrideSounds>0</OverrideSounds>
<Version>15</Version>
<ExternalPlayer>FlashPlayer11.2</ExternalPlayer>
<ActionScriptVersion>2</ActionScriptVersion>
<PackageExportFrame>1</PackageExportFrame>
<PackagePaths></PackagePaths>
<AS3PackagePaths>.</AS3PackagePaths>
<AS3ConfigConst>CONFIG::FLASH_AUTHORING=&quot;true&quot;;</AS3ConfigConst>
<DebuggingPermitted>0</DebuggingPermitted>
<DebuggingPassword></DebuggingPassword>
<CompressMovie>1</CompressMovie>
<CompressionType>0</CompressionType>
<InvisibleLayer>1</InvisibleLayer>
<DeviceSound>0</DeviceSound>
<StreamUse8kSampleRate>0</StreamUse8kSampleRate>
<EventUse8kSampleRate>0</EventUse8kSampleRate>
<UseNetwork>0</UseNetwork>
<DocumentClass></DocumentClass>
<AS3Strict>2</AS3Strict>
<AS3Coach>4</AS3Coach>
<AS3AutoDeclare>4096</AS3AutoDeclare>
<AS3Dialect>AS3</AS3Dialect>
<AS3ExportFrame>1</AS3ExportFrame>
<AS3Optimize>1</AS3Optimize>
<ExportSwc>0</ExportSwc>
<ScriptStuckDelay>15</ScriptStuckDelay>
<IncludeXMP>1</IncludeXMP>
<HardwareAcceleration>0</HardwareAcceleration>
<AS3Flags>4102</AS3Flags>
<DefaultLibraryLinkage>rsl</DefaultLibraryLinkage>
<RSLPreloaderMethod>wrap</RSLPreloaderMethod>
<RSLPreloaderSWF>$(AppConfig)/ActionScript 3.0/rsls/loader_animation.swf</RSLPreloaderSWF>
<LibraryPath>
<library-path-entry>
<swc-path>$(AppConfig)/ActionScript 3.0/libs</swc-path>
<linkage>merge</linkage>
</library-path-entry>
<library-path-entry>
<swc-path>$(AppConfig)/ActionScript 3.0/libs/11.0/textLayout.swc</swc-path>
<linkage usesDefault="true">rsl</linkage>
<rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>textLayout_2.0.0.232.swz</rsl-url>
</library-path-entry>
</LibraryPath>
<LibraryVersions>
<library-version>
<swc-path>$(AppConfig)/ActionScript 3.0/libs/11.0/textLayout.swc</swc-path>
<feature name="tlfText" majorVersion="2" minorVersion="0" build="232"/>
<rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>textLayout_2.0.0.232.swz</rsl-url>
</library-version>
</LibraryVersions>
</PublishFlashProperties>
<PublishJpegProperties enabled="true">
<Width>550</Width>
<Height>400</Height>
<Progressive>0</Progressive>
<DPI>4718592</DPI>
<Size>0</Size>
<Quality>80</Quality>
<MatchMovieDim>1</MatchMovieDim>
</PublishJpegProperties>
<PublishRNWKProperties enabled="true">
<exportFlash>1</exportFlash>
<flashBitRate>0</flashBitRate>
<exportAudio>1</exportAudio>
<audioFormat>0</audioFormat>
<singleRateAudio>0</singleRateAudio>
<realVideoRate>100000</realVideoRate>
<speed28K>1</speed28K>
<speed56K>1</speed56K>
<speedSingleISDN>0</speedSingleISDN>
<speedDualISDN>0</speedDualISDN>
<speedCorporateLAN>0</speedCorporateLAN>
<speed256K>0</speed256K>
<speed384K>0</speed384K>
<speed512K>0</speed512K>
<exportSMIL>1</exportSMIL>
</PublishRNWKProperties>
<PublishGifProperties enabled="true">
<Width>550</Width>
<Height>400</Height>
<Animated>0</Animated>
<MatchMovieDim>1</MatchMovieDim>
<Loop>1</Loop>
<LoopCount></LoopCount>
<OptimizeColors>1</OptimizeColors>
<Interlace>0</Interlace>
<Smooth>1</Smooth>
<DitherSolids>0</DitherSolids>
<RemoveGradients>0</RemoveGradients>
<TransparentOption></TransparentOption>
<TransparentAlpha>128</TransparentAlpha>
<DitherOption></DitherOption>
<PaletteOption></PaletteOption>
<MaxColors>255</MaxColors>
<PaletteName></PaletteName>
</PublishGifProperties>
<PublishPNGProperties enabled="true">
<Width>550</Width>
<Height>400</Height>
<OptimizeColors>1</OptimizeColors>
<Interlace>0</Interlace>
<Transparent>0</Transparent>
<Smooth>1</Smooth>
<DitherSolids>0</DitherSolids>
<RemoveGradients>0</RemoveGradients>
<MatchMovieDim>1</MatchMovieDim>
<DitherOption></DitherOption>
<FilterOption></FilterOption>
<PaletteOption></PaletteOption>
<BitDepth>24-bit with Alpha</BitDepth>
<MaxColors>255</MaxColors>
<PaletteName></PaletteName>
</PublishPNGProperties>
<PublishQTProperties enabled="true">
<Width>550</Width>
<Height>400</Height>
<MatchMovieDim>1</MatchMovieDim>
<UseQTSoundCompression>0</UseQTSoundCompression>
<AlphaOption></AlphaOption>
<LayerOption></LayerOption>
<QTSndSettings>00000000</QTSndSettings>
<ControllerOption>0</ControllerOption>
<Looping>0</Looping>
<PausedAtStart>0</PausedAtStart>
<PlayEveryFrame>0</PlayEveryFrame>
<Flatten>1</Flatten>
</PublishQTProperties>
</flash_profile>
</flash_profiles>

View File

@@ -0,0 +1 @@
PROXY-CS5