public ActionDefineFunction(int actionLength, SWFInputStream sis, int version)
     throws IOException {
   super(0x9B, actionLength);
   this.version = version;
   functionName = sis.readString("functionName");
   int numParams = sis.readUI16("numParams");
   for (int i = 0; i < numParams; i++) {
     paramNames.add(sis.readString("paramName"));
   }
   codeSize = sis.readUI16("codeSize");
 }
  /**
   * Constructor
   *
   * @param sis
   * @param data
   * @throws IOException
   */
  public PlaceObject2Tag(SWFInputStream sis, ByteArrayRange data) throws IOException {
    super(sis.getSwf(), ID, "PlaceObject2", data);
    placeFlagHasClipActions = sis.readUB(1, "placeFlagHasClipActions") == 1;
    placeFlagHasClipDepth = sis.readUB(1, "placeFlagHasClipDepth") == 1;
    placeFlagHasName = sis.readUB(1, "placeFlagHasName") == 1;
    placeFlagHasRatio = sis.readUB(1, "placeFlagHasRatio") == 1;
    placeFlagHasColorTransform = sis.readUB(1, "placeFlagHasColorTransform") == 1;
    placeFlagHasMatrix = sis.readUB(1, "placeFlagHasMatrix") == 1;
    placeFlagHasCharacter = sis.readUB(1, "placeFlagHasCharacter") == 1;
    placeFlagMove = sis.readUB(1, "placeFlagMove") == 1;

    depth = sis.readUI16("depth");
    if (placeFlagHasCharacter) {
      characterId = sis.readUI16("characterId");
    }
    if (placeFlagHasMatrix) {
      matrix = sis.readMatrix("matrix");
    }
    if (placeFlagHasColorTransform) {
      colorTransform = sis.readCXFORMWITHALPHA("colorTransform");
    }
    if (placeFlagHasRatio) {
      ratio = sis.readUI16("ratio");
    }
    if (placeFlagHasName) {
      name = sis.readString("name");
    }
    if (placeFlagHasClipDepth) {
      clipDepth = sis.readUI16("clipDepth");
    }
    if (placeFlagHasClipActions) {
      clipActions = sis.readCLIPACTIONS(swf, this, "clipActions");
    }
  }
 public ActionDefineFunction2(int actionLength, SWFInputStream sis, int version)
     throws IOException {
   super(0x8E, actionLength);
   this.version = version;
   functionName = sis.readString("functionName");
   int numParams = sis.readUI16("numParams");
   registerCount = sis.readUI8("registerCount");
   preloadParentFlag = sis.readUB(1, "preloadParentFlag") == 1;
   preloadRootFlag = sis.readUB(1, "preloadRootFlag") == 1;
   suppressSuperFlag = sis.readUB(1, "suppressSuperFlag") == 1;
   preloadSuperFlag = sis.readUB(1, "preloadSuperFlag") == 1;
   suppressArgumentsFlag = sis.readUB(1, "suppressArgumentsFlag") == 1;
   preloadArgumentsFlag = sis.readUB(1, "preloadArgumentsFlag") == 1;
   suppressThisFlag = sis.readUB(1, "suppressThisFlag") == 1;
   preloadThisFlag = sis.readUB(1, "preloadThisFlag") == 1;
   reserved = (int) sis.readUB(7, "reserved");
   preloadGlobalFlag = sis.readUB(1, "preloadGlobalFlag") == 1;
   for (int i = 0; i < numParams; i++) {
     paramRegisters.add(sis.readUI8("paramRegister"));
     paramNames.add(sis.readString("paramName"));
   }
   codeSize = sis.readUI16("codeSize");
 }
 @Override
 public final void readData(
     SWFInputStream sis,
     ByteArrayRange data,
     int level,
     boolean parallel,
     boolean skipUnusualTags,
     boolean lazy)
     throws IOException {
   int numSymbols = sis.readUI16("numSymbols");
   tags = new ArrayList<>(numSymbols);
   names = new ArrayList<>(numSymbols);
   for (int i = 0; i < numSymbols; i++) {
     int tagID = sis.readUI16("tagID");
     String className = sis.readString("className");
     tags.add(tagID);
     names.add(className);
   }
 }
 @Override
 public final void readData(
     SWFInputStream sis,
     ByteArrayRange data,
     int level,
     boolean parallel,
     boolean skipUnusualTags,
     boolean lazy)
     throws IOException {
   if (sis.available() > 0) {
     reserved = sis.readUI16("reserved");
   } else {
     reserved = 0;
   }
   if (sis.available() > 0) {
     passwordHash = sis.readString("passwordHash");
   } else {
     passwordHash = null;
   }
 }