swfobjects.int
上传用户:raido2005
上传日期:2022-06-22
资源大小:5044k
文件大小:116k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. //*******************************************************//
  2. //                                                       //
  3. //                      DelphiFlash.com                  //
  4. //         Copyright (c) 2004-2008 FeatherySoft, Inc.    //
  5. //                    info@delphiflash.com               //
  6. //                                                       //
  7. //*******************************************************//
  8. //  Description:  Level of SWF-objects
  9. //  Last update: 26 jun 2008
  10. {$I defines.inc}
  11. Unit SWFObjects;
  12. interface
  13.  Uses Windows, SysUtils, Classes, SWFConst, Graphics, Contnrs,
  14.  {$IFDEF ExternalUTF}
  15.   Unicode,
  16.  {$ENDIF}
  17.  {$IFDEF VARIANTS}
  18.   Variants,
  19.  {$ENDIF}
  20.  {$IFDEF XMLSupport}
  21.   XMLIntf, XMLDoc, SWFXMLTools, SWFStrings,
  22.  {$ENDIF}
  23.   SWFTools;
  24. type
  25.   TSWFRect = class (TObject)
  26.   public
  27.     procedure Assign(Source: TSWFRect);
  28.     property Height: Integer read GetHeight;
  29.     property Rec: recRect read GetRec write SetRec;
  30.     property Rect: TRect read GetRect write SetRect;
  31.     property Width: Integer read GetWidth;
  32.     property Xmax: LongInt read FXmax write SetXmax;
  33.     property Xmin: LongInt read FXmin write SetXmin;
  34.     property Ymax: LongInt read FYmax write SetYmax;
  35.     property Ymin: LongInt read FYmin write SetYmin;
  36.   end;
  37.   TSWFRGB = class (TObject)
  38.   public
  39.     procedure Assign(Source: TObject); virtual;
  40.     property B: Byte read FB write FB;
  41.     property G: Byte read FG write FG;
  42.     property R: Byte read FR write FR;
  43.     property RGB: recRGB read GetRGB write SetRGB;
  44.   end;
  45.   TSWFRGBA = class (TSWFRGB)
  46.   public
  47.     constructor Create(a: boolean = false);
  48.     procedure Assign(Source: TObject); override;
  49.     property A: Byte read FA write SetA;
  50.     property HasAlpha: Boolean read FHasAlpha write SetHasAlpha;
  51.     property RGBA: recRGBA read GetRGBA write SetRGBA;
  52.   end;
  53.   TSWFColorTransform = class (TObject)
  54.   public
  55.     procedure AddTint(Color: TColor);
  56.     procedure Assign(Source: TSWFColorTransform);
  57.     function CheckAddValue(value: integer): integer;
  58.     function CheckMultValue(value: integer): integer;
  59.     procedure SetAdd(R, G, B, A: integer);
  60.     procedure SetMult(R, G, B, A: integer);
  61.     property addA: Integer read FaddA write SetaddA;
  62.     property addB: Integer read FaddB write SetaddB;
  63.     property addG: Integer read FaddG write SetaddG;
  64.     property addR: Integer read FaddR write SetaddR;
  65.     property hasAdd: Boolean read FhasAdd write FhasAdd;
  66.     property hasAlpha: Boolean read FhasAlpha write FhasAlpha;
  67.     property hasMult: Boolean read FhasMult write FhasMult;
  68.     property multA: Integer read FmultA write SetmultA;
  69.     property multB: Integer read FmultB write SetmultB;
  70.     property multG: Integer read FmultG write SetmultG;
  71.     property multR: Integer read FmultR write SetmultR;
  72.     property REC: recColorTransform read GetREC write SetREC;
  73.   end;
  74.   TSWFMatrix = class (TObject)
  75.   public
  76.     procedure Assign(M : TSWFMatrix);
  77.     procedure SetRotate(angle: single);
  78.     procedure SetScale(ScaleX, ScaleY: single);
  79.     procedure SetSkew(SkewX, SkewY: single);
  80.     procedure SetTranslate(X, Y: LongInt);
  81.     property HasScale: Boolean read FHasScale write FHasScale;
  82.     property HasSkew: Boolean read FHasSkew write FHasSkew;
  83.     property REC: recMatrix read GetREC write SetREC;
  84.     property ScaleX: Single read GetScaleX write SetScaleX;
  85.     property ScaleY: Single read GetScaleY write SetScaleY;
  86.     property SkewX: Single read GetSkewX write SetSkewX;
  87.     property SkewY: Single read GetSkewY write SetSkewY;
  88.     property TranslateX: LongInt read FTranslateX write FTranslateX;
  89.     property TranslateY: LongInt read FTranslateY write FTranslateY;
  90.   end;
  91. {$IFDEF XMLSupport}
  92.   TBasedSWFObject = class;
  93.   TSWFObject = class;
  94.   TSWFObjectXMLRWEvent = procedure (sender: TBasedSWFObject; Node: IXMLNode) of object;
  95.   TSWFLogicPart = (lpDefault, lpImage, lpSound, lpVideo, lpFont, lpActions, lpNotIdentified);
  96.   TXMLWriteAsExternals = set of TSWFLogicPart;
  97.   TXMLReadWriteSettings = class (TObject)
  98.    public
  99.      constructor Create;
  100.      function GetResName(LP: TSWFLogicPart): string;
  101.      function GetFullPath(LP: TSWFLogicPart): string;
  102.      function GetFullName(LP: TSWFLogicPart; fname: string): string;
  103.      function GetRelativePath(LP: TSWFLogicPart): string;
  104.      property ActionsAsByteCode: boolean read FActionsAsByteCode write FActionsAsByteCode;
  105.      property AsExternal: TXMLWriteAsExternals read FAsExternal write FAsExternal;
  106.      property BasePath: string read FBasePath write SetBasePath;
  107.      property CustomData: longint read FCustomData write FCustomData;
  108.      property ExtCounter: word read FExtCounter write FExtCounter;
  109.      property FileExtension: string read FFileExtension write FFileExtension;
  110.      property FilePrefix: string read FFilePrefix write FFilePrefix;
  111.      property FontAsByteCode: boolean read FFontAsByteCode write FFontAsByteCode;
  112.      property Path: string read FPath write FPath;
  113.      property PathActions: string read FPathActions write FPathActions;
  114.      property PathImage: string read FPathImage write FPathImage;
  115.      property PathSound: string read FPathSound write FPathSound;
  116.      property PathFont: string read FPathFont write FPathFont;
  117.      property PathVideo: string read FPathVideo write FPathVideo;
  118.      property SomePath: boolean read FSomePath write FSomePath;
  119. //     property PathDelimiter: Char read FPathDelimiter write FPathDelimiter;
  120.   end;
  121. {$ENDIF}
  122.   TBasedSWFObject = class (TObject)
  123.   public
  124.     procedure Assign(Source: TBasedSWFObject); virtual; abstract;
  125.     procedure CopyFrom(Source: TBasedSWFObject); virtual;
  126.     function LibraryLevel: Byte; virtual; abstract;
  127.     function MinVersion: Byte; virtual;
  128.     procedure WriteToStream(be: TBitsEngine); virtual; abstract;
  129. {$IFDEF XMLSupport}
  130.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); virtual;
  131. {$ENDIF}
  132.   end;
  133.   TSWFObject = class (TBasedSWFObject)
  134.   public
  135.     procedure Assign(Source: TBasedSWFObject); override;
  136.     function GetFullSize: LongInt;
  137.     function LibraryLevel: Byte; override;
  138.     procedure ReadFromStream(be: TBitsEngine); virtual;
  139.     procedure WriteTagBody(be: TBitsEngine); virtual;
  140.     procedure WriteToStream(be: TBitsEngine); override;
  141. {$IFDEF XMLSupport}
  142.     procedure WriteToXML(Parent: IXMLNode; Settings: TXMLReadWriteSettings);
  143.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); virtual;
  144. {$ENDIF}
  145.     property BodySize: LongWord read FBodySize write FBodySize;
  146.     property TagID: Word read FTagID write FTagID;
  147.   end;
  148. //  TSWFErrorTag = class (TSWFObject)
  149. //  private
  150. //    FTagIDFrom: Word;
  151. //    FText: string;
  152. //  public
  153. //    constructor Create;
  154. //    property TagIDFrom: Word read FTagIDFrom write FTagIDFrom;
  155. //    property Text: string read FText write FText;
  156. //  end;
  157.   TSWFTagEvent = procedure (sender: TSWFObject; BE: TBitsEngine) of object;
  158. // ===========================================================
  159. //                Control Tags
  160. // ===========================================================
  161.   TSWFSetBackgroundColor = class (TSWFObject)
  162.   public
  163.     constructor Create;
  164.     destructor Destroy; override;
  165.     procedure Assign(Source: TBasedSWFObject); override;
  166.     procedure ReadFromStream(be: TBitsEngine); override;
  167.     procedure WriteTagBody(be: TBitsEngine); override;
  168. {$IFDEF XMLSupport}
  169.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  170.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  171. {$ENDIF}
  172.     property Color: TSWFRGB read FColor;
  173.   end;
  174.   TSWFFrameLabel = class (TSWFObject)
  175.   public
  176.     constructor Create; overload;
  177.     constructor Create(fl: string); overload;
  178.     procedure Assign(Source: TBasedSWFObject); override;
  179.     function MinVersion: Byte; override;
  180.     procedure ReadFromStream(be: TBitsEngine); override;
  181.     procedure WriteTagBody(be: TBitsEngine); override;
  182. {$IFDEF XMLSupport}
  183.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  184.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  185. {$ENDIF}
  186.     property isAnchor: Boolean read FisAnchor write FisAnchor;
  187.     property Name: string read FName write FName;
  188.   end;
  189.   TSWFProtect = class (TSWFObject)
  190.   public
  191.     constructor Create; virtual;
  192.     procedure Assign(Source: TBasedSWFObject); override;
  193.     function MinVersion: Byte; override;
  194.     procedure ReadFromStream(be: TBitsEngine); override;
  195.     procedure WriteTagBody(be: TBitsEngine); override;
  196. {$IFDEF XMLSupport}
  197.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  198.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  199. {$ENDIF}
  200.     property Hash: string read FHash write FHash;
  201.     property Password: string read FPassword write FPassword;
  202.   end;
  203.   TSWFEnd = class (TSWFObject)
  204.   public
  205.     constructor Create;
  206.   end;
  207.   TSWFExportAssets = class (TSWFObject)
  208.   public
  209.     constructor Create; virtual;
  210.     destructor Destroy; override;
  211.     procedure Assign(Source: TBasedSWFObject); override;
  212.     function MinVersion: Byte; override;
  213.     procedure ReadFromStream(be: TBitsEngine); override;
  214.     procedure SetAsset(Name: string; CharacterId: word);
  215.     procedure WriteTagBody(be: TBitsEngine); override;
  216. {$IFDEF XMLSupport}
  217.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  218.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  219. {$ENDIF}
  220.     property Assets: TStringList read FAssets;
  221.     property CharacterId[name: string]: Integer read GetCharacterId write SetCharacterId;
  222.   end;
  223.   TSWFImportAssets = class (TSWFExportAssets)
  224.   public
  225.     constructor Create; override;
  226.     procedure Assign(Source: TBasedSWFObject); override;
  227.     procedure ReadFromStream(be: TBitsEngine); override;
  228.     procedure WriteTagBody(be: TBitsEngine); override;
  229. {$IFDEF XMLSupport}
  230.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  231.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  232. {$ENDIF}
  233.     property URL: string read FURL write FURL;
  234.   end;
  235.   TSWFImportAssets2 = class(TSWFImportAssets)
  236.   public
  237.     constructor Create; override;
  238.     procedure ReadFromStream(be: TBitsEngine); override;
  239.     procedure WriteTagBody(be: TBitsEngine); override;
  240.   end;
  241.   TSWFEnableDebugger = class (TSWFProtect)
  242.   public
  243.     constructor Create; override;
  244.     function MinVersion: Byte; override;
  245.   end;
  246.   TSWFEnableDebugger2 = class (TSWFProtect)
  247.   public
  248.     constructor Create; override;
  249.     function MinVersion: Byte; override;
  250.   end;
  251.   TSWFScriptLimits = class (TSWFObject)
  252.   public
  253.     constructor Create;
  254.     procedure Assign(Source: TBasedSWFObject); override;
  255.     function MinVersion: Byte; override;
  256.     procedure ReadFromStream(be: TBitsEngine); override;
  257.     procedure WriteTagBody(be: TBitsEngine); override;
  258. {$IFDEF XMLSupport}
  259.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  260.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  261. {$ENDIF}
  262.     property MaxRecursionDepth: Word read FMaxRecursionDepth write FMaxRecursionDepth;
  263.     property ScriptTimeoutSeconds: Word read FScriptTimeoutSeconds write FScriptTimeoutSeconds;
  264.   end;
  265.   TSWFSetTabIndex = class (TSWFObject)
  266.   public
  267.     constructor Create;
  268.     procedure Assign(Source: TBasedSWFObject); override;
  269.     function MinVersion: Byte; override;
  270.     procedure ReadFromStream(be: TBitsEngine); override;
  271.     procedure WriteTagBody(be: TBitsEngine); override;
  272. {$IFDEF XMLSupport}
  273.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  274.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  275. {$ENDIF}
  276.     property Depth: Word read FDepth write FDepth;
  277.     property TabIndex: Word read FTabIndex write FTabIndex;
  278.   end;
  279.  TSWFSymbolClass = class (TSWFExportAssets)
  280.  public
  281.     constructor Create; override;
  282.     function MinVersion: Byte; override;
  283.  end;
  284.  TSWFFileAttributes = class (TSWFObject)
  285.  public
  286.     constructor Create;
  287.     procedure Assign(Source: TBasedSWFObject); override;
  288.     function MinVersion: Byte; override;
  289.     procedure ReadFromStream(be: TBitsEngine); override;
  290.     procedure WriteTagBody(be: TBitsEngine); override;
  291. {$IFDEF XMLSupport}
  292.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  293.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  294. {$ENDIF}
  295.     property ActionScript3: boolean read FActionScript3 write FActionScript3;
  296.     property HasMetadata: boolean read FHasMetadata write FHasMetadata;
  297.     property UseNetwork: boolean read FUseNetwork write FUseNetwork;
  298.   end;
  299.  TSWFMetadata = class (TSWFObject)
  300.  public
  301.     constructor Create;
  302.     procedure Assign(Source: TBasedSWFObject); override;
  303.     function MinVersion: Byte; override;
  304.     procedure ReadFromStream(be: TBitsEngine); override;
  305.     procedure WriteTagBody(be: TBitsEngine); override;
  306. {$IFDEF XMLSupport}
  307.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  308.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  309. {$ENDIF}
  310.     property Metadata: AnsiString read FMetadata write FMetadata;
  311.  end;
  312.  TSWFProductInfo = class (TSWFObject)
  313.  public
  314.     constructor Create;
  315.     procedure Assign(Source: TBasedSWFObject); override;
  316.     function MinVersion: Byte; override;
  317.     procedure ReadFromStream(be: TBitsEngine); override;
  318.     procedure WriteTagBody(be: TBitsEngine); override;
  319. {$IFDEF XMLSupport}
  320.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  321.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  322. {$ENDIF}
  323.     property MajorBuild: longword read FMajorBuild write FMajorBuild;
  324.     property MinorBuild: longword read FMinorBuild write FMinorBuild;
  325.     property CompilationDate: TDateTime read FCompilationDate write FCompilationDate;
  326.     property Edition: longint read FEdition write FEdition;
  327.     property MajorVersion: byte read FMajorVersion write FMajorVersion;
  328.     property MinorVersion: byte read FMinorVersion write FMinorVersion;
  329.     property ProductId: longint read FProductId write FProductId;
  330.  end;
  331.  TSWFDefineScalingGrid = class (TSWFObject)
  332.  public
  333.     constructor Create;
  334.     destructor Destroy; override;
  335.     procedure Assign(Source: TBasedSWFObject); override;
  336.     function MinVersion: Byte; override;
  337.     procedure ReadFromStream(be: TBitsEngine); override;
  338.     procedure WriteTagBody(be: TBitsEngine); override;
  339. {$IFDEF XMLSupport}
  340.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  341.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  342. {$ENDIF}
  343.     property CharacterId: word read FCharacterId write FCharacterId;
  344.     property Splitter: TSWFRect read FSplitter;
  345.  end;
  346. // ===========================================================
  347. //                          Actions
  348. // ===========================================================
  349. // ------------ SWF 3 -----------
  350.   TSWFAction = class (TObject)
  351.   public
  352.     procedure Assign(Source: TSWFAction); virtual;
  353.     function GetFullSize: Word;
  354.     function MinVersion: Byte; virtual;
  355.     procedure ReadFromStream(be: TBitsEngine); virtual;
  356.     procedure WriteActionBody(be: TBitsEngine); virtual;
  357.     procedure WriteToStream(be: TBitsEngine); virtual;
  358. {$IFDEF XMLSupport}
  359.     procedure ReadFromXMLNode(Node: IXMLNode); virtual;
  360.     procedure WriteToXML(Root: IXMLNode);
  361.     procedure WriteToXMLNode(Node: IXMLNode); virtual;
  362. {$ENDIF}
  363.     property ActionCode: Byte read FActionCode write FActionCode;
  364.     property BodySize: Word read FBodySize write FBodySize;
  365.   end;
  366. TSWFActionRecord = TSWFAction;
  367.   TSWFActionGotoFrame = class (TSWFAction)
  368.   public
  369.     constructor Create;
  370.     procedure Assign(Source: TSWFAction); override;
  371.     procedure ReadFromStream(be: TBitsEngine); override;
  372.     procedure WriteActionBody(be: TBitsEngine); override;
  373. {$IFDEF XMLSupport}
  374.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  375.     procedure WriteToXMLNode(Node: IXMLNode); override;
  376. {$ENDIF}
  377.     property Frame: Word read FFrame write FFrame;
  378.   end;
  379.   TSWFActionGetUrl = class (TSWFAction)
  380.   public
  381.     constructor Create;
  382.     procedure Assign(Source: TSWFAction); override;
  383.     procedure ReadFromStream(be: TBitsEngine); override;
  384.     procedure WriteActionBody(be: TBitsEngine); override;
  385. {$IFDEF XMLSupport}
  386.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  387.     procedure WriteToXMLNode(Node: IXMLNode); override;
  388. {$ENDIF}
  389.     property Target: string read FTarget write FTarget;
  390.     property URL: AnsiString read FURL write FURL;
  391.   end;
  392.   TSWFActionNextFrame = class (TSWFAction)
  393.   public
  394.     constructor Create;
  395.   end;
  396.   TSWFActionPreviousFrame = class (TSWFAction)
  397.   public
  398.     constructor Create;
  399.   end;
  400.   TSWFActionPlay = class (TSWFAction)
  401.   public
  402.     constructor Create;
  403.   end;
  404.   TSWFActionStop = class (TSWFAction)
  405.   public
  406.     constructor Create;
  407.   end;
  408.   TSWFActionToggleQuality = class (TSWFAction)
  409.   public
  410.     constructor Create;
  411.   end;
  412.   TSWFActionStopSounds = class (TSWFAction)
  413.   public
  414.     constructor Create;
  415.   end;
  416.   TSWFActionWaitForFrame = class (TSWFAction)
  417.   public
  418.     constructor Create;
  419.     procedure Assign(Source: TSWFAction); override;
  420.     procedure ReadFromStream(be: TBitsEngine); override;
  421.     procedure WriteActionBody(be: TBitsEngine); override;
  422. {$IFDEF XMLSupport}
  423.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  424.     procedure WriteToXMLNode(Node: IXMLNode); override;
  425. {$ENDIF}
  426.     property Frame: Word read FFrame write FFrame;
  427.     property SkipCount: Byte read FSkipCount write FSkipCount;
  428.   end;
  429.   TSWFActionSetTarget = class (TSWFAction)
  430.   public
  431.     constructor Create;
  432.     procedure Assign(Source: TSWFAction); override;
  433.     procedure ReadFromStream(be: TBitsEngine); override;
  434.     procedure WriteActionBody(be: TBitsEngine); override;
  435. {$IFDEF XMLSupport}
  436.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  437.     procedure WriteToXMLNode(Node: IXMLNode); override;
  438. {$ENDIF}
  439.     property TargetName: string read FTargetName write FTargetName;
  440.   end;
  441.   TSWFActionGoToLabel = class (TSWFAction)
  442.   public
  443.     constructor Create;
  444.     procedure Assign(Source: TSWFAction); override;
  445.     procedure ReadFromStream(be: TBitsEngine); override;
  446.     procedure WriteActionBody(be: TBitsEngine); override;
  447. {$IFDEF XMLSupport}
  448.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  449.     procedure WriteToXMLNode(Node: IXMLNode); override;
  450. {$ENDIF}
  451.     property FrameLabel: string read FFrameLabel write FFrameLabel;
  452.   end;
  453. // ------------ SWF 4 -----------
  454.   TSWFAction4 = class (TSWFAction)
  455.   public
  456.     function MinVersion: Byte; override;
  457.   end;
  458.   TSWFOffsetMarker = class (TSWFAction)
  459.   public
  460.     constructor Create;
  461.     procedure Assign(Source: TSWFAction); override;
  462.     procedure WriteActionBody(be: TBitsEngine); override;
  463.     procedure WriteOffset(be: TBitsEngine);
  464. {$IFDEF XMLSupport}
  465.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  466.     procedure WriteToXMLNode(Node: IXMLNode); override;
  467. {$ENDIF}
  468.     property isUsing: Boolean read FisUsing write FisUsing;
  469.     property JumpToBack: Boolean read FJumpToBack write FJumpToBack;
  470.     property ManualSet: Boolean read FManualSet write FManualSet;
  471.     property MarkerName: string read FMarkerName write FMarkerName;
  472.     property RootStreamPosition: LongInt read FRootStreamPosition write FRootStreamPosition;
  473.     property SizeOffset: Byte read FSizeOffset write FSizeOffset;
  474.     property StartPosition: LongInt read FStartPosition write FStartPosition;
  475.   end;
  476.   TSWFTryOffsetMarker = class (TSWFOffsetMarker)
  477.   public
  478.     isValueInit: Boolean;
  479.     property Value: Variant read FValue write SetValue;
  480.     property ValueType: TSWFValueType read FValueType write SetValueType;
  481.   end;
  482.   TSWFActionPush = class (TSWFAction4)
  483.   public
  484.     constructor Create;
  485.     destructor Destroy; override;
  486.     function AddValue(V: Variant): Integer;
  487.     procedure Assign(Source: TSWFAction); override;
  488.     function MinVersion: Byte; override;
  489.     procedure ReadFromStream(be: TBitsEngine); override;
  490.     function ValueCount: Word;
  491.     procedure WriteActionBody(be: TBitsEngine); override;
  492. {$IFDEF XMLSupport}
  493.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  494.     procedure WriteToXMLNode(Node: IXMLNode); override;
  495. {$ENDIF}
  496.     property Value[index: integer]: Variant read GetValue write SetValue;
  497.     property ValueInfo[index: integer]: TPushValueInfo read GetValueInfo;
  498.   end;
  499.   TSWFActionPop = class (TSWFAction4)
  500.   public
  501.     constructor Create;
  502.   end;
  503. // -- Arithmetic Operators --
  504.   TSWFActionAdd = class (TSWFAction4)
  505.   public
  506.     constructor Create;
  507.   end;
  508.   TSWFActionSubtract = class (TSWFAction4)
  509.   public
  510.     constructor Create;
  511.   end;
  512.   TSWFActionMultiply = class (TSWFAction4)
  513.   public
  514.     constructor Create;
  515.   end;
  516.   TSWFActionDivide = class (TSWFAction4)
  517.   public
  518.     constructor Create;
  519.   end;
  520. // --  Numerical Comparison --
  521.   TSWFActionEquals = class (TSWFAction4)
  522.   public
  523.     constructor Create;
  524.   end;
  525.   TSWFActionLess = class (TSWFAction4)
  526.   public
  527.     constructor Create;
  528.   end;
  529. // -- Logical Operators --
  530.   TSWFActionAnd = class (TSWFAction4)
  531.   public
  532.     constructor Create;
  533.   end;
  534.   TSWFActionOr = class (TSWFAction4)
  535.   public
  536.     constructor Create;
  537.   end;
  538.   TSWFActionNot = class (TSWFAction4)
  539.   public
  540.     constructor Create;
  541.   end;
  542. // -- String Manipulation --
  543.   TSWFActionStringEquals = class (TSWFAction4)
  544.   public
  545.     constructor Create;
  546.   end;
  547.   TSWFActionStringLength = class (TSWFAction4)
  548.   public
  549.     constructor Create;
  550.   end;
  551.   TSWFActionStringAdd = class (TSWFAction4)
  552.   public
  553.     constructor Create;
  554.   end;
  555.   TSWFActionStringExtract = class (TSWFAction4)
  556.   public
  557.     constructor Create;
  558.   end;
  559.   TSWFActionStringLess = class (TSWFAction4)
  560.   public
  561.     constructor Create;
  562.   end;
  563.   TSWFActionMBStringLength = class (TSWFAction4)
  564.   public
  565.     constructor Create;
  566.   end;
  567.   TSWFActionMBStringExtract = class (TSWFAction4)
  568.   public
  569.     constructor Create;
  570.   end;
  571. // -- Type Conversion --
  572.   TSWFActionToInteger = class (TSWFAction4)
  573.   public
  574.     constructor Create;
  575.   end;
  576.   TSWFActionCharToAscii = class (TSWFAction4)
  577.   public
  578.     constructor Create;
  579.   end;
  580.   TSWFActionAsciiToChar = class (TSWFAction4)
  581.   public
  582.     constructor Create;
  583.   end;
  584.   TSWFActionMBCharToAscii = class (TSWFAction4)
  585.   public
  586.     constructor Create;
  587.   end;
  588.   TSWFActionMBAsciiToChar = class (TSWFAction4)
  589.   public
  590.     constructor Create;
  591.   end;
  592. // -- Control Flow --
  593.   TSWFActionJump = class (TSWFAction4)
  594.   public
  595.     constructor Create;
  596.     destructor Destroy; override;
  597.     procedure Assign(Source: TSWFAction); override;
  598.     procedure ReadFromStream(be: TBitsEngine); override;
  599.     procedure WriteActionBody(be: TBitsEngine); override;
  600.     procedure WriteToStream(be: TBitsEngine); override;
  601. {$IFDEF XMLSupport}
  602.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  603.     procedure WriteToXMLNode(Node: IXMLNode); override;
  604. {$ENDIF}
  605.     property BranchOffset: SmallInt read FBranchOffset write SetBranchOffset;
  606.     property BranchOffsetMarker: TSWFOffsetMarker read GetBranchOffsetMarker write FBranchOffsetMarker;
  607.     property StaticOffset: Boolean read FStaticOffset write FStaticOffset;
  608.   end;
  609.   TSWFActionIf = class (TSWFActionJump)
  610.   public
  611.     constructor Create;
  612.   end;
  613.   TSWFActionCall = class (TSWFAction4)
  614.   public
  615.     constructor Create;
  616.   end;
  617. // -- Variables --
  618.   TSWFActionGetVariable = class (TSWFAction4)
  619.   public
  620.     constructor Create;
  621.   end;
  622.   TSWFActionSetVariable = class (TSWFAction4)
  623.   public
  624.     constructor Create;
  625.   end;
  626. // -- Movie Control --
  627.   TSWFActionGetURL2 = class (TSWFAction4)
  628.   public
  629.     constructor Create;
  630.     procedure Assign(Source: TSWFAction); override;
  631.     procedure ReadFromStream(be: TBitsEngine); override;
  632.     procedure WriteActionBody(be: TBitsEngine); override;
  633. {$IFDEF XMLSupport}
  634.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  635.     procedure WriteToXMLNode(Node: IXMLNode); override;
  636. {$ENDIF}
  637.     property LoadTargetFlag: Boolean read FLoadTargetFlag write FLoadTargetFlag;
  638.     property LoadVariablesFlag: Boolean read FLoadVariablesFlag write FLoadVariablesFlag;
  639.     property SendVarsMethod: Byte read FSendVarsMethod write FSendVarsMethod;
  640.   end;
  641.   TSWFActionGotoFrame2 = class (TSWFAction4)
  642.   public
  643.     constructor Create;
  644.     procedure Assign(Source: TSWFAction); override;
  645.     procedure ReadFromStream(be: TBitsEngine); override;
  646.     procedure WriteActionBody(be: TBitsEngine); override;
  647. {$IFDEF XMLSupport}
  648.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  649.     procedure WriteToXMLNode(Node: IXMLNode); override;
  650. {$ENDIF}
  651.     property PlayFlag: Boolean read FPlayFlag write FPlayFlag;
  652.     property SceneBias: Word read FSceneBias write FSceneBias;
  653.     property SceneBiasFlag: Boolean read FSceneBiasFlag write FSceneBiasFlag;
  654.   end;
  655.   TSWFActionSetTarget2 = class (TSWFAction4)
  656.   public
  657.     constructor Create;
  658.   end;
  659.   TSWFActionGetProperty = class (TSWFAction4)
  660.   public
  661.     constructor Create;
  662.   end;
  663.   TSWFActionSetProperty = class (TSWFAction4)
  664.   public
  665.     constructor Create;
  666.   end;
  667.   TSWFActionCloneSprite = class (TSWFAction4)
  668.   public
  669.     constructor Create;
  670.   end;
  671.   TSWFActionRemoveSprite = class (TSWFAction4)
  672.   public
  673.     constructor Create;
  674.   end;
  675.   TSWFActionStartDrag = class (TSWFAction4)
  676.   public
  677.     constructor Create;
  678.   end;
  679.   TSWFActionEndDrag = class (TSWFAction4)
  680.   public
  681.     constructor Create;
  682.   end;
  683.   TSWFActionWaitForFrame2 = class (TSWFAction4)
  684.   public
  685.     constructor Create;
  686.   end;
  687. // -- Utilities --
  688.   TSWFActionTrace = class (TSWFAction4)
  689.   public
  690.     constructor Create;
  691.   end;
  692.   TSWFActionGetTime = class (TSWFAction4)
  693.   public
  694.     constructor Create;
  695.   end;
  696.   TSWFActionRandomNumber = class (TSWFAction4)
  697.   public
  698.     constructor Create;
  699.   end;
  700.   TSWFActionFSCommand2 = class (TSWFAction4)
  701.   public
  702.     constructor Create;
  703.   end;
  704. // ------------ SWF 5 -----------
  705. // -- ScriptObject Actions --
  706.   TSWFActionByteCode = class (TSWFAction4)
  707.   public
  708.     constructor Create;
  709.     destructor Destroy; override;
  710.     procedure Assign(Source: TSWFAction); override;
  711.     procedure WriteActionBody(be: TBitsEngine); override;
  712.     procedure ReadFromStream(be: TBitsEngine); override;
  713. {$IFDEF XMLSupport}
  714.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  715.     procedure WriteToXMLNode(Node: IXMLNode); override;
  716. {$ENDIF}
  717.     property ByteCode[Index: word]: Byte read GetByteCode write SetByteCode;
  718.     property Data: TStream read GetData write SetData;
  719.     property DataSize: LongInt read FDataSize write SetDataSize;
  720.     property SelfDestroy: Boolean read FSelfDestroy write FSelfDestroy;
  721.     property StrByteCode: AnsiString read GetStrByteCode write SetStrByteCode;
  722.   end;
  723.   TSWFAction5 = class (TSWFAction)
  724.   public
  725.     function MinVersion: Byte; override;
  726.   end;
  727.   TSWFActionCallFunction = class (TSWFAction5)
  728.   public
  729.     constructor Create;
  730.   end;
  731.   TSWFActionCallMethod = class (TSWFAction5)
  732.   public
  733.     constructor Create;
  734.   end;
  735.   TSWFActionConstantPool = class (TSWFAction5)
  736.   public
  737.     constructor Create;
  738.     destructor Destroy; override;
  739.     procedure Assign(Source: TSWFAction); override;
  740.     procedure ReadFromStream(be: TBitsEngine); override;
  741.     procedure WriteActionBody(be: TBitsEngine); override;
  742. {$IFDEF XMLSupport}
  743.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  744.     procedure WriteToXMLNode(Node: IXMLNode); override;
  745. {$ENDIF}
  746.     property ConstantPool: TStringList read FConstantPool;
  747.   end;
  748.   TSWFActionDefineFunction = class (TSWFAction5)
  749.   public
  750.     constructor Create;
  751.     destructor Destroy; override;
  752.     procedure Assign(Source: TSWFAction); override;
  753.     procedure ReadFromStream(be: TBitsEngine); override;
  754.     procedure WriteActionBody(be: TBitsEngine); override;
  755.     procedure WriteToStream(be: TBitsEngine); override;
  756. {$IFDEF XMLSupport}
  757.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  758.     procedure WriteToXMLNode(Node: IXMLNode); override;
  759. {$ENDIF}
  760.     property CodeSize: Word read FCodeSize write SetCodeSize;
  761.     property CodeSizeMarker: TSWFOffsetMarker read GetCodeSizeMarker write FCodeSizeMarker;
  762.     property FunctionName: string read FFunctionName write FFunctionName;
  763.     property Params: TStringList read FParams;
  764.     property StaticOffset: Boolean read FStaticOffset write FStaticOffset;
  765.   end;
  766.   TSWFActionDefineLocal = class (TSWFAction5)
  767.   public
  768.     constructor Create;
  769.   end;
  770.   TSWFActionDefineLocal2 = class (TSWFAction5)
  771.   public
  772.     constructor Create;
  773.   end;
  774.   TSWFActionDelete = class (TSWFAction5)
  775.   public
  776.     constructor Create;
  777.   end;
  778.   TSWFActionDelete2 = class (TSWFAction5)
  779.   public
  780.     constructor Create;
  781.   end;
  782.   TSWFActionEnumerate = class (TSWFAction5)
  783.   public
  784.     constructor Create;
  785.   end;
  786.   TSWFActionEquals2 = class (TSWFAction5)
  787.   public
  788.     constructor Create;
  789.   end;
  790.   TSWFActionGetMember = class (TSWFAction5)
  791.   public
  792.     constructor Create;
  793.   end;
  794.   TSWFActionInitArray = class (TSWFAction5)
  795.   public
  796.     constructor Create;
  797.   end;
  798.   TSWFActionInitObject = class (TSWFAction5)
  799.   public
  800.     constructor Create;
  801.   end;
  802.   TSWFActionNewMethod = class (TSWFAction5)
  803.   public
  804.     constructor Create;
  805.   end;
  806.   TSWFActionNewObject = class (TSWFAction5)
  807.   public
  808.     constructor Create;
  809.   end;
  810.   TSWFActionSetMember = class (TSWFAction5)
  811.   public
  812.     constructor Create;
  813.   end;
  814.   TSWFActionTargetPath = class (TSWFAction5)
  815.   public
  816.     constructor Create;
  817.   end;
  818.   TSWFActionWith = class (TSWFAction5)
  819.   public
  820.     constructor Create;
  821.     destructor Destroy; override;
  822.     procedure Assign(Source: TSWFAction); override;
  823.     procedure ReadFromStream(be: TBitsEngine); override;
  824.     procedure WriteActionBody(be: TBitsEngine); override;
  825.     procedure WriteToStream(be: TBitsEngine); override;
  826. {$IFDEF XMLSupport}
  827.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  828.     procedure WriteToXMLNode(Node: IXMLNode); override;
  829. {$ENDIF}
  830.     property Size: Word read FSize write SetSize;
  831.     property SizeMarker: TSWFOffsetMarker read GetSizeMarker write FSizeMarker;
  832.     property StaticOffset: Boolean read FStaticOffset write FStaticOffset;
  833.   end;
  834. // -- Type Actions --
  835.   TSWFActionToNumber = class (TSWFAction5)
  836.   public
  837.     constructor Create;
  838.   end;
  839.   TSWFActionToString = class (TSWFAction5)
  840.   public
  841.     constructor Create;
  842.   end;
  843.   TSWFActionTypeOf = class (TSWFAction5)
  844.   public
  845.     constructor Create;
  846.   end;
  847. // -- Math Actions --
  848.   TSWFActionAdd2 = class (TSWFAction5)
  849.   public
  850.     constructor Create;
  851.   end;
  852.   TSWFActionLess2 = class (TSWFAction5)
  853.   public
  854.     constructor Create;
  855.   end;
  856.   TSWFActionModulo = class (TSWFAction5)
  857.   public
  858.     constructor Create;
  859.   end;
  860. // -- Stack Operator Actions --
  861.   TSWFActionBitAnd = class (TSWFAction5)
  862.   public
  863.     constructor Create;
  864.   end;
  865.   TSWFActionBitLShift = class (TSWFAction5)
  866.   public
  867.     constructor Create;
  868.   end;
  869.   TSWFActionBitOr = class (TSWFAction5)
  870.   public
  871.     constructor Create;
  872.   end;
  873.   TSWFActionBitRShift = class (TSWFAction5)
  874.   public
  875.     constructor Create;
  876.   end;
  877.   TSWFActionBitURShift = class (TSWFAction5)
  878.   public
  879.     constructor Create;
  880.   end;
  881.   TSWFActionBitXor = class (TSWFAction5)
  882.   public
  883.     constructor Create;
  884.   end;
  885.   TSWFActionDecrement = class (TSWFAction5)
  886.   public
  887.     constructor Create;
  888.   end;
  889.   TSWFActionIncrement = class (TSWFAction5)
  890.   public
  891.     constructor Create;
  892.   end;
  893.   TSWFActionPushDuplicate = class (TSWFAction5)
  894.   public
  895.     constructor Create;
  896.   end;
  897.   TSWFActionReturn = class (TSWFAction5)
  898.   public
  899.     constructor Create;
  900.   end;
  901.   TSWFActionStackSwap = class (TSWFAction5)
  902.   public
  903.     constructor Create;
  904.   end;
  905.   TSWFActionStoreRegister = class (TSWFAction5)
  906.   public
  907.     constructor Create;
  908.     procedure Assign(Source: TSWFAction); override;
  909.     procedure ReadFromStream(be: TBitsEngine); override;
  910.     procedure WriteActionBody(be: TBitsEngine); override;
  911. {$IFDEF XMLSupport}
  912.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  913.     procedure WriteToXMLNode(Node: IXMLNode); override;
  914. {$ENDIF}
  915.     property RegisterNumber: Byte read FRegisterNumber write FRegisterNumber;
  916.   end;
  917. // ------------ SWF 6 -----------
  918.   TSWFAction6 = class (TSWFAction)
  919.   public
  920.     function MinVersion: Byte; override;
  921.   end;
  922.   TSWFActionInstanceOf = class (TSWFAction6)
  923.   public
  924.     constructor Create;
  925.   end;
  926.   TSWFActionEnumerate2 = class (TSWFAction6)
  927.   public
  928.     constructor Create;
  929.   end;
  930.   TSWFActionStrictEquals = class (TSWFAction6)
  931.   public
  932.     constructor Create;
  933.   end;
  934.   TSWFActionGreater = class (TSWFAction6)
  935.   public
  936.     constructor Create;
  937.   end;
  938.   TSWFActionStringGreater = class (TSWFAction6)
  939.   public
  940.     constructor Create;
  941.   end;
  942. // ------------ SWF 7 -----------
  943.   TSWFAction7 = class (TSWFAction)
  944.   public
  945.     function MinVersion: Byte; override;
  946.   end;
  947.   TSWFActionDefineFunction2 = class (TSWFAction7)
  948.   public
  949.     constructor Create;
  950.     destructor Destroy; override;
  951.     procedure Assign(Source: TSWFAction); override;
  952.     procedure AddParam(const param: string; reg: byte);
  953.     procedure ReadFromStream(be: TBitsEngine); override;
  954.     procedure WriteActionBody(be: TBitsEngine); override;
  955.     procedure WriteToStream(be: TBitsEngine); override;
  956. {$IFDEF XMLSupport}
  957.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  958.     procedure WriteToXMLNode(Node: IXMLNode); override;
  959. {$ENDIF}
  960.     property CodeSize: Word read FCodeSize write SetCodeSize;
  961.     property CodeSizeMarker: TSWFOffsetMarker read GetCodeSizeMarker write FCodeSizeMarker;
  962.     property FunctionName: string read FFunctionName write FFunctionName;
  963.     property Parameters: TStringList read FParameters write FParameters;
  964.     property ParamRegister[Index: byte]: byte read GetParamRegister write SetParamRegister;
  965.     property PreloadArgumentsFlag: Boolean read FPreloadArgumentsFlag write FPreloadArgumentsFlag;
  966.     property PreloadGlobalFlag: Boolean read FPreloadGlobalFlag write FPreloadGlobalFlag;
  967.     property PreloadParentFlag: Boolean read FPreloadParentFlag write FPreloadParentFlag;
  968.     property PreloadRootFlag: Boolean read FPreloadRootFlag write FPreloadRootFlag;
  969.     property PreloadSuperFlag: Boolean read FPreloadSuperFlag write FPreloadSuperFlag;
  970.     property PreloadThisFlag: Boolean read FPreloadThisFlag write FPreloadThisFlag;
  971.     property RegisterCount: Byte read FRegisterCount write FRegisterCount;
  972.     property StaticOffset: Boolean read FStaticOffset write FStaticOffset;
  973.     property SuppressArgumentsFlag: Boolean read FSuppressArgumentsFlag write FSuppressArgumentsFlag;
  974.     property SuppressSuperFlag: Boolean read FSuppressSuperFlag write FSuppressSuperFlag;
  975.     property SuppressThisFlag: Boolean read FSuppressThisFlag write FSuppressThisFlag;
  976.   end;
  977.   TSWFActionExtends = class (TSWFAction7)
  978.   public
  979.     constructor Create;
  980.   end;
  981.   TSWFActionCastOp = class (TSWFAction7)
  982.   public
  983.     constructor Create;
  984.   end;
  985.   TSWFActionImplementsOp = class (TSWFAction7)
  986.   public
  987.     constructor Create;
  988.   end;
  989.   TSWFActionTry = class (TSWFAction7)
  990.   public
  991.     constructor Create;
  992.     destructor Destroy; override;
  993.     procedure Assign(Source: TSWFAction); override;
  994.     procedure ReadFromStream(be: TBitsEngine); override;
  995.     procedure WriteActionBody(be: TBitsEngine); override;
  996.     procedure WriteToStream(be: TBitsEngine); override;
  997. {$IFDEF XMLSupport}
  998.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  999.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1000. {$ENDIF}
  1001.     property CatchBlockFlag: Boolean read FCatchBlockFlag write FCatchBlockFlag;
  1002.     property CatchInRegisterFlag: Boolean read FCatchInRegisterFlag write FCatchInRegisterFlag;
  1003.     property CatchName: string read FCatchName write FCatchName;
  1004.     property CatchRegister: Byte read FCatchRegister write FCatchRegister;
  1005.     property CatchSize: Word read FCatchSize write SetCatchSize;
  1006.     property CatchSizeMarker: TSWFTryOffsetMarker read GetCatchSizeMarker write FCatchSizeMarker;
  1007.     property FinallyBlockFlag: Boolean read FFinallyBlockFlag write FFinallyBlockFlag;
  1008.     property FinallySize: Word read FFinallySize write SetFinallySize;
  1009.     property FinallySizeMarker: TSWFTryOffsetMarker read GetFinallySizeMarker write FFinallySizeMarker;
  1010.     property StaticOffset: Boolean read FStaticOffset write FStaticOffset;
  1011.     property TrySize: Word read FTrySize write SetTrySize;
  1012.     property TrySizeMarker: TSWFTryOffsetMarker read GetTrySizeMarker write FTrySizeMarker;
  1013.   end;
  1014.   TSWFActionThrow = class (TSWFAction7)
  1015.   public
  1016.     constructor Create;
  1017.   end;
  1018.   TSWFActionList = class (TObjectList)
  1019.   public
  1020.     property Action[Index: word]: TSWFAction read GetAction write SetAction; default;
  1021.   end;
  1022.   TSWFDoAction = class (TSWFObject)
  1023.   public
  1024.     constructor Create; overload; virtual;
  1025.     constructor Create(A: TSWFActionList); overload; virtual;
  1026.     destructor Destroy; override;
  1027.     procedure Assign(Source: TBasedSWFObject); override;
  1028.     function MinVersion: Byte; override;
  1029.     procedure ReadFromStream(be: TBitsEngine); override;
  1030.     procedure WriteTagBody(be: TBitsEngine); override;
  1031. {$IFDEF XMLSupport}
  1032.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1033.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1034. {$ENDIF}
  1035.     property Actions: TSWFActionList read FActions;
  1036.     property ParseActions: Boolean read FParseActions write FParseActions;
  1037. {$IFDEF XMLSupport}
  1038.     property OnXMLReadAction: TSWFObjectXMLRWEvent read FOnXMLReadAction write FOnXMLReadAction;
  1039. {$ENDIF}
  1040.   end;
  1041.   TSWFDoInitAction = class (TSWFDoAction)
  1042.   public
  1043.     constructor Create; override;
  1044.     constructor Create(A: TSWFActionList); override;
  1045.     procedure Assign(Source: TBasedSWFObject); override;
  1046.     function MinVersion: Byte; override;
  1047.     procedure ReadFromStream(be: TBitsEngine); override;
  1048.     procedure WriteTagBody(be: TBitsEngine); override;
  1049. {$IFDEF XMLSupport}
  1050.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1051.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1052. {$ENDIF}
  1053.     property SpriteID: Word read FSpriteID write FSpriteID;
  1054.   end;
  1055. // ===========================================================
  1056. //                           AS3
  1057. // ===========================================================
  1058.   TSWFDoubleObject = class (TObject)
  1059.     Value: Double;
  1060.     constructor Create(init: double);
  1061.   end;
  1062.   TSWFNameSpaceObject = class (TObject)
  1063.     Kind: byte;
  1064.     Name: Longint;
  1065.     constructor Create(kind: byte; name: Longint);
  1066.   end;
  1067.   TSWFIntegerList = class (TList)
  1068.   public
  1069. {$IFDEF VER130}
  1070.     procedure Assign(source: TSWFIntegerList);
  1071. {$ENDIF}
  1072.     procedure WriteToStream(be: TBitsEngine);
  1073.     procedure AddInt(value: longint);
  1074.     property Int[index: longint]: longint read GetInt write SetInt;
  1075.   end;
  1076.   TSWFBasedMultiNameObject = class (TObject)
  1077.   public
  1078.     procedure Assign(source: TSWFBasedMultiNameObject); virtual;
  1079.     procedure ReadFromStream(be: TBitsEngine); virtual;
  1080.     procedure WriteToStream(be: TBitsEngine); virtual;
  1081. {$IFDEF XMLSupport}
  1082.     procedure ReadFromXMLNode(Node: IXMLNode); virtual;
  1083.     procedure WriteToXMLNode(Node: IXMLNode); virtual;
  1084. {$ENDIF}
  1085.     property MultinameKind: byte read FMultinameKind  write FMultinameKind;
  1086.   end;
  1087.   TSWFmnQName = class (TSWFBasedMultiNameObject)
  1088.   public
  1089.     procedure Assign(source: TSWFBasedMultiNameObject); override;
  1090.     procedure ReadFromStream(be: TBitsEngine); override;
  1091.     procedure WriteToStream(be: TBitsEngine); override;
  1092. {$IFDEF XMLSupport}
  1093.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  1094.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1095. {$ENDIF}
  1096.     property NS: Longint read FNS write FNS;
  1097.     property Name: Longint read FName write FName;
  1098.   end;
  1099.   TSWFmnRTQName = class (TSWFBasedMultiNameObject)
  1100.   public
  1101.     procedure Assign(source: TSWFBasedMultiNameObject); override;
  1102.     procedure ReadFromStream(be: TBitsEngine); override;
  1103.     procedure WriteToStream(be: TBitsEngine); override;
  1104. {$IFDEF XMLSupport}
  1105.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  1106.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1107. {$ENDIF}
  1108.     property Name: Longint read FName write FName;
  1109.   end;
  1110.   TSWFmnRTQNameL = TSWFBasedMultiNameObject;
  1111.   TSWFmnMultiname = class (TSWFBasedMultiNameObject)
  1112.   public
  1113.     procedure Assign(source: TSWFBasedMultiNameObject); override;
  1114.     procedure ReadFromStream(be: TBitsEngine); override;
  1115.     procedure WriteToStream(be: TBitsEngine); override;
  1116. {$IFDEF XMLSupport}
  1117.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  1118.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1119. {$ENDIF}
  1120.     property NSSet: Longint read FNSSet write FNSSet;
  1121.     property Name: Longint read FName write FName;
  1122.   end;
  1123.   TSWFmnMultinameL = class (TSWFBasedMultiNameObject)
  1124.   public
  1125.     procedure Assign(source: TSWFBasedMultiNameObject); override;
  1126.     procedure ReadFromStream(be: TBitsEngine); override;
  1127.     procedure WriteToStream(be: TBitsEngine); override;
  1128. {$IFDEF XMLSupport}
  1129.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  1130.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1131. {$ENDIF}
  1132.     property NSSet: Longint read FNSSet write FNSSet;
  1133.   end;
  1134.   TSWFAS3ConstantPool = class (TObject)
  1135.   public
  1136.     constructor Create;
  1137.     destructor Destroy; override;
  1138.     procedure Assign(Source: TSWFAS3ConstantPool);
  1139.     procedure ReadFromStream(be: TBitsEngine);
  1140.     procedure WriteToStream(be: TBitsEngine);
  1141.     property Double[index: longint]: Double read GetDouble write SetDouble;
  1142.     property DoubleCount: longint read GetDoubleCount;
  1143.     property Int[index: longint]: longint read GetInt write SetInt;
  1144.     property IntCount: longint read GetIntCount;
  1145.     property Multiname[index: longint]: TSWFBasedMultiNameObject read GetMultiname write SetMultiname;
  1146.     property MultinameCount: longint read GetMultinameCount;
  1147.     property NameSpace[index: longint]: TSWFNameSpaceObject read GetNameSpace write SetNameSpace;
  1148.     property NameSpaceCount: longint read GetNameSpaceCount;
  1149.     property NameSpaceSET[index: longint]: TSWFIntegerList read GetNameSpaceSET write SetNameSpaceSET;
  1150.     property NameSpaceSETCount: longint read GetNameSpaceSETCount;
  1151.     property Strings[index: longint]: string read GetStrings write SetStrings;
  1152.     property StringsCount: longint read GetStringsCount;
  1153.     property UInt[index: longint]: longword read GetUInt write SetUInt;
  1154.     property UIntCount: longword read GetUIntCount;
  1155.   end;
  1156.   TSWFAS3MethodOptions = class (TObject)
  1157.     val: longint;
  1158.     kind: byte;
  1159.   end;
  1160.   TSWFAS3Method = class (TObject)
  1161.   public
  1162.     constructor Create;
  1163.     destructor Destroy; override;
  1164.     procedure Assign(source: TSWFAS3Method);
  1165.     function AddOption: TSWFAS3MethodOptions;
  1166.     property HasOptional: boolean read FHasOptional write FHasOptional;
  1167.     property HasParamNames: boolean read FHasParamNames write FHasParamNames;
  1168.     property Name: Longint read FName write FName;
  1169.     property NeedActivation: boolean read FNeedActivation write FNeedActivation;
  1170.     property NeedArguments: boolean read FNeedArguments write FNeedArguments;
  1171.     property NeedRest: boolean read FNeedRest write FNeedRest;
  1172.     property Option[index: integer]: TSWFAS3MethodOptions read GetOption;
  1173.     property Options: TObjectList read FOptions;
  1174.     property ParamNames: TSWFIntegerList read FParamNames;
  1175.     property ParamTypes: TSWFIntegerList read FParamTypes;
  1176.     property ReturnType: Longint read FReturnType write FReturnType;
  1177.     property SetDxns: boolean read FSetDxns write FSetDxns;
  1178.   end;
  1179.   TSWFAS3Methods = class (TObject)
  1180.   public
  1181.     constructor Create;
  1182.     destructor Destroy; override;
  1183.     procedure Assign(source: TSWFAS3Methods);
  1184.     function AddMethod: TSWFAS3Method;
  1185.     procedure ReadFromStream(be: TBitsEngine);
  1186.     procedure WriteToStream(be: TBitsEngine);
  1187.     property Method[index: integer]: TSWFAS3Method read GetMethod;
  1188.   end;
  1189.   TSWFAS3MetadataItem = class (TObject)
  1190.   public
  1191.     property Value: LongInt read FValue write FValue;
  1192.     property Key: LongInt read FKey write FKey;
  1193.   end;
  1194.   TSWFAS3MetadataInfo = class (TObject)
  1195.   public
  1196.     constructor Create;
  1197.     destructor Destroy; override;
  1198.     procedure Assign(source: TSWFAS3MetadataInfo);
  1199.     function AddMetadataItem: TSWFAS3MetadataItem;
  1200.     property InfoList: TObjectList read FInfoList;
  1201.     property MetaItem[index: integer]: TSWFAS3MetadataItem read GetItem;
  1202.     property Name: Longint read FName write FName;
  1203.   end;
  1204.   TSWFAS3Metadata = class (TObject)
  1205.   public
  1206.     constructor Create;
  1207.     destructor Destroy; override;
  1208.     procedure Assign(source: TSWFAS3Metadata);
  1209.     function AddMetaInfo: TSWFAS3MetadataInfo;
  1210.     procedure ReadFromStream(be: TBitsEngine);
  1211.     procedure WriteToStream(be: TBitsEngine);
  1212. {$IFDEF XMLSupport}
  1213.     procedure WriteToXMLNode(SelfNode: IXMLNode);
  1214. {$ENDIF}
  1215.     property MetadataList: TObjectList read FMetadataList;
  1216.     property MetadataInfo[index: integer]: TSWFAS3MetadataInfo read GetMetadata;
  1217.   end;
  1218.   TSWFAS3Trait = class (TObject)
  1219.   public
  1220.     destructor Destroy; override;
  1221.     procedure Assign(source: TSWFAS3Trait);
  1222.     procedure ReadFromStream(be: TBitsEngine);
  1223.     procedure WriteToStream(be: TBitsEngine);
  1224. {$IFDEF XMLSupport}
  1225.     procedure WriteToXMLNode(Node: IXMLNode);
  1226.     procedure ReadFromXMLNode(Node: IXMLNode);
  1227. {$ENDIF}
  1228.     property ID: LongInt read FID write FID;
  1229.     property IsFinal: Boolean read FIsFinal write FIsFinal;
  1230.     property IsMetadata: Boolean read FIsMetadata write SetIsMetadata;
  1231.     property IsOverride: Boolean read FIsOverride write FIsOverride;
  1232.     property Name: LongInt read FName write FName;
  1233.     property TraitType: byte read FTraitType write FTraitType;
  1234.     property Metadata: TSWFIntegerList read GetMetadata;
  1235.     property SpecID: LongInt read FSpecID write FSpecID;
  1236.     property VIndex: LongInt read FVIndex write FVIndex;
  1237.     property VKind: byte read FVKind write FVKind;
  1238.   end;
  1239.   TSWFAS3Traits = class (TObject)
  1240.     FTraits: TObjectList;
  1241.     function GetTrait(Index: Integer): TSWFAS3Trait;
  1242.   public
  1243.     constructor Create; virtual;
  1244.     destructor Destroy; override;
  1245.     procedure Assign(source: TSWFAS3Traits);
  1246.     function AddTrait: TSWFAS3Trait;
  1247.     property Trait[Index: longint]: TSWFAS3Trait read GetTrait;
  1248.     property Traits: TObjectList read FTraits;
  1249.   end;
  1250.   TSWFAS3InstanceItem = class (TSWFAS3Traits)
  1251.   public
  1252.     constructor Create; override;
  1253.     destructor Destroy; override;
  1254.     procedure Assign(source: TSWFAS3InstanceItem);
  1255.     procedure ReadFromStream(be: TBitsEngine);
  1256.     procedure WriteToStream(be: TBitsEngine);
  1257.     property ClassFinal: Boolean read FClassFinal write FClassFinal;
  1258.     property ClassInterface: Boolean read FClassInterface write FClassInterface;
  1259.     property ClassProtectedNs: Boolean read FClassProtectedNs write FClassProtectedNs;
  1260.     property ClassSealed: Boolean read FClassSealed write FClassSealed;
  1261.     property Iinit: LongInt read FIinit write FIinit;
  1262.     property Interfaces: TSWFIntegerList read FInterfaces;
  1263.     property Name: LongInt read FName write FName;
  1264.     property ProtectedNs: LongInt read FProtectedNs write FProtectedNs;
  1265.     property SuperName: LongInt read FSuperName write FSuperName;
  1266.   end;
  1267.   TSWFAS3Instance = class (TObjectList)
  1268.   public
  1269.     procedure Assign(source: TSWFAS3Instance);
  1270.     function AddInstanceItem: TSWFAS3InstanceItem;
  1271.     procedure ReadFromStream(Count: Longint; be: TBitsEngine);
  1272.     procedure WriteToStream(be: TBitsEngine);
  1273.     property InstanceItem[Index: longint]: TSWFAS3InstanceItem read GetInstanceItem;
  1274.   end;
  1275.   TSWFAS3ClassInfo = class (TSWFAS3Traits)
  1276.   public
  1277.     procedure Assign(source: TSWFAS3ClassInfo);
  1278.     procedure ReadFromStream(be: TBitsEngine);
  1279.     procedure WriteToStream(be: TBitsEngine);
  1280.     property CInit: LongInt read FCInit write FCInit;
  1281.   end;
  1282.   TSWFAS3Classes = class(TObjectList)
  1283.   public
  1284.     procedure Assign(source: TSWFAS3Classes);
  1285.     procedure ReadFromStream(rcount: longInt; be: TBitsEngine);
  1286.     procedure WriteToStream(be: TBitsEngine);
  1287.     function AddClassInfo: TSWFAS3ClassInfo;
  1288.     property _ClassInfo[Index: Integer]: TSWFAS3ClassInfo read GetClassInfo;
  1289.   end;
  1290.   TSWFAS3ScriptInfo = TSWFAS3ClassInfo;
  1291.   TSWFAS3Scripts = class(TObjectList)
  1292.   public
  1293.     procedure Assign(source: TSWFAS3Scripts);
  1294.     procedure ReadFromStream(be: TBitsEngine);
  1295.     procedure WriteToStream(be: TBitsEngine);
  1296.     function AddScriptInfo: TSWFAS3ScriptInfo;
  1297.     property ScriptInfo[Index: Integer]: TSWFAS3ScriptInfo read GetScriptInfo;
  1298.   end;
  1299.   TSWFAS3Exception = class (TObject)
  1300.   public
  1301.     procedure Assign(source: TSWFAS3Exception);
  1302.     property ExcType: LongInt read FExcType write FExcType;
  1303.     property From: LongInt read FFrom write FFrom;
  1304.     property Target: LongInt read FTarget write FTarget;
  1305.     property VarName: LongInt read FVarName write FVarName;
  1306.     property _To: LongInt read F_To write F_To;
  1307.   end;
  1308.   TSWFAS3MethodBodyInfo = class (TSWFAS3Traits)
  1309.    public
  1310.     constructor Create; override;
  1311.     destructor Destroy; override;
  1312.     procedure Assign(source: TSWFAS3MethodBodyInfo);
  1313.     procedure ReadFromStream(be: TBitsEngine);
  1314.     procedure WriteToStream(be: TBitsEngine);
  1315.     function AddException: TSWFAS3Exception;
  1316.     property Code: TMemoryStream read FCode;
  1317.     property StrCode: AnsiString read GetStrByteCode write SetStrByteCode;
  1318.     property CodeItem[Index: Integer]: byte read GetCodeItem write SetCodeItem;
  1319.     property Exception[Index: Integer]: TSWFAS3Exception read GetException;
  1320.     property Exceptions: TObjectList read FExceptions;
  1321.     property InitScopeDepth: LongInt read FInitScopeDepth write FInitScopeDepth;
  1322.     property LocalCount: LongInt read FLocalCount write FLocalCount;
  1323.     property MaxScopeDepth: LongInt read FMaxScopeDepth write FMaxScopeDepth;
  1324.     property MaxStack: LongInt read FMaxStack write FMaxStack;
  1325.     property Method: LongInt read FMethod write FMethod;
  1326.   end;
  1327.   TSWFAS3MethodBodies = class(TObjectList)
  1328.   public
  1329.     procedure Assign(source: TSWFAS3MethodBodies);
  1330.     procedure ReadFromStream(be: TBitsEngine);
  1331.     procedure WriteToStream(be: TBitsEngine);
  1332.     function AddMethodBodyInfo: TSWFAS3MethodBodyInfo;
  1333.     property MethodBodyInfo[Index: Integer]: TSWFAS3MethodBodyInfo read GetClassInfo;
  1334.   end;
  1335.   TSWFDoABC = class (TSWFObject)
  1336.   public
  1337.     constructor Create;
  1338.     destructor Destroy; override;
  1339.     procedure Assign(Source: TBasedSWFObject); override;
  1340.     function MinVersion: Byte; override;
  1341.     procedure ReadFromStream(be: TBitsEngine); override;
  1342.     procedure WriteTagBody(be: TBitsEngine); override;
  1343. {$IFDEF XMLSupport}
  1344.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1345.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1346. {$ENDIF}
  1347.     property ActionName: string read FActionName write FActionName;
  1348.     property Classes: TSWFAS3Classes read GetClasses;
  1349.     property ConstantPool: TSWFAS3ConstantPool read FConstantPool;
  1350.     property Data: TStream read GetData write SetData;
  1351.     property DataSize: LongInt read FDataSize write SetDataSize;
  1352.     property DoAbcLazyInitializeFlag: boolean read FDoAbcLazyInitializeFlag write FDoAbcLazyInitializeFlag;
  1353.     property Instance: TSWFAS3Instance read GetInstance;
  1354.     property MajorVersion: Word read FMajorVersion write FMajorVersion;
  1355.     property Metadata: TSWFAS3Metadata read GetMetadata;
  1356.     property MethodBodies: TSWFAS3MethodBodies read GetMethodBodies;
  1357.     property Methods: TSWFAS3Methods read GetMethods;
  1358.     property MinorVersion: Word read FMinorVersion write FMinorVersion;
  1359.     property ParseActions: Boolean read FParseActions write FParseActions;
  1360.     property Scripts: TSWFAS3Scripts read GetScripts;
  1361.     property SelfDestroy: Boolean read FSelfDestroy write FSelfDestroy;
  1362.     property StrVersion: string read GetStrVersion write SetStrVersion;
  1363.   end;
  1364. // ===========================================================
  1365. //                       Display List
  1366. // ===========================================================
  1367.   TSWFBasedPlaceObject = class (TSWFObject)
  1368.   public
  1369.     procedure Assign(Source: TBasedSWFObject); override;
  1370.     property CharacterId: Word read FCharacterId write SetCharacterId;
  1371.     property Depth: Word read FDepth write FDepth;
  1372.   end;
  1373.   TSWFPlaceObject = class (TSWFBasedPlaceObject)
  1374.   public
  1375.     constructor Create;
  1376.     destructor Destroy; override;
  1377.     procedure Assign(Source: TBasedSWFObject); override;
  1378.     procedure ReadFromStream(be: TBitsEngine); override;
  1379.     procedure WriteTagBody(be: TBitsEngine); override;
  1380. {$IFDEF XMLSupport}
  1381.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1382.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1383. {$ENDIF}
  1384.     property ColorTransform: TSWFColorTransform read FColorTransform;
  1385.     property InitColorTransform: Boolean read GetInitColorTransform write FInitColorTransform;
  1386.     property Matrix: TSWFMatrix read FMatrix;
  1387.   end;
  1388.   TSWFClipActionRecord = class (TSWFActionList)
  1389.   public
  1390. //    constructor Create;
  1391. //    destructor Destroy; override;
  1392.     procedure Assign(Source: TSWFClipActionRecord);
  1393.     property Actions: TSWFActionList read GetActions;
  1394.     property EventFlags: TSWFClipEvents read FEventFlags write FEventFlags;
  1395.     property KeyCode: Byte read FKeyCode write SetKeyCode;
  1396.   end;
  1397.   TSWFClipActions = class (TObject)
  1398.   public
  1399.     constructor Create;
  1400.     destructor Destroy; override;
  1401.     function AddActionRecord(EventFlags: TSWFClipEvents; KeyCode: byte): TSWFClipActionRecord;
  1402.     procedure Assign(Source: TSWFClipActions);
  1403.     function Count: integer;
  1404.     property ActionRecord[Index: Integer]: TSWFClipActionRecord read GetActionRecord;
  1405.     property ActionRecords: TObjectList read FActionRecords;
  1406.     property AllEventFlags: TSWFClipEvents read FAllEventFlags write FAllEventFlags;
  1407.   end;
  1408.   TSWFPlaceObject2 = class (TSWFBasedPlaceObject)
  1409.   public
  1410.     constructor Create;
  1411.     destructor Destroy; override;
  1412.     procedure Assign(Source: TBasedSWFObject); override;
  1413.     function ClipActions: TSWFClipActions;
  1414.     function MinVersion: Byte; override;
  1415.     procedure ReadFromStream(be: TBitsEngine); override;
  1416.     procedure WriteTagBody(be: TBitsEngine); override;
  1417. {$IFDEF XMLSupport}
  1418.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1419.     procedure ReadEventActionsFromXML(Node: IXMLNode; Settings: TXMLReadWriteSettings);
  1420.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1421. {$ENDIF}
  1422.     property ClipDepth: Word read FClipDepth write SetClipDepth;
  1423.     property ColorTransform: TSWFColorTransform read GetColorTransform;
  1424.     property Matrix: TSWFMatrix read GetMatrix;
  1425.     property Name: string read FName write SetName;
  1426.     property ParseActions: Boolean read FParseActions write FParseActions;
  1427.     property PlaceFlagHasCharacter: Boolean read FPlaceFlagHasCharacter write FPlaceFlagHasCharacter;
  1428.     property PlaceFlagHasClipActions: Boolean read FPlaceFlagHasClipActions write FPlaceFlagHasClipActions;
  1429.     property PlaceFlagHasClipDepth: Boolean read FPlaceFlagHasClipDepth write FPlaceFlagHasClipDepth;
  1430.     property PlaceFlagHasColorTransform: Boolean read FPlaceFlagHasColorTransform write FPlaceFlagHasColorTransform;
  1431.     property PlaceFlagHasMatrix: Boolean read FPlaceFlagHasMatrix write FPlaceFlagHasMatrix;
  1432.     property PlaceFlagHasName: Boolean read FPlaceFlagHasName write FPlaceFlagHasName;
  1433.     property PlaceFlagHasRatio: Boolean read FPlaceFlagHasRatio write FPlaceFlagHasRatio;
  1434.     property PlaceFlagMove: Boolean read FPlaceFlagMove write FPlaceFlagMove;
  1435.     property Ratio: Word read FRatio write SetRatio;
  1436.     property SWFVersion: Byte read FSWFVersion write FSWFVersion;
  1437. {$IFDEF XMLSupport}
  1438.     property OnXMLReadAction: TSWFObjectXMLRWEvent read FOnXMLReadAction write FOnXMLReadAction;
  1439. {$ENDIF}
  1440.   end;
  1441.  TSWFFilter = class (TObject)
  1442.  public
  1443.   procedure Assign(Source: TSWFFilter); virtual; abstract;
  1444.   procedure ReadFromStream(be: TBitsEngine); virtual; abstract;
  1445.   procedure WriteToStream(be: TBitsEngine); virtual; abstract;
  1446. {$IFDEF XMLSupport}
  1447.   procedure ReadFromXMLNode(Node: IXMLNode); virtual; abstract;
  1448.   procedure WriteToXMLNode(Node: IXMLNode); virtual; abstract;
  1449. {$ENDIF}
  1450.   property FilterID: TSWFFilterID read FFilterID write FFilterID;
  1451.  end;
  1452.  TSWFColorMatrixFilter = class (TSWFFilter)
  1453.  public
  1454.   constructor Create;
  1455.   procedure AdjustColor(Brightness, Contrast, Saturation, Hue: Integer);
  1456.   procedure Assign(Source: TSWFFilter); override;
  1457.   procedure ResetValues;
  1458.   procedure ReadFromStream(be: TBitsEngine); override;
  1459.   procedure WriteToStream(be: TBitsEngine); override;
  1460. {$IFDEF XMLSupport}
  1461.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1462.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1463. {$ENDIF}
  1464.   property Matrix[Index: Integer]: single read GetMatrix write SetMatrix;
  1465.   property R0: single read GetR0 write SetR0;
  1466.   property R1: single read GetR1 write SetR1;
  1467.   property R2: single read GetR2 write SetR2;
  1468.   property R3: single read GetR3 write SetR3;
  1469.   property R4: single read GetR4 write SetR4;
  1470.   property G0: single read GetG0 write SetG0;
  1471.   property G1: single read GetG1 write SetG1;
  1472.   property G2: single read GetG2 write SetG2;
  1473.   property G3: single read GetG3 write SetG3;
  1474.   property G4: single read GetG4 write SetG4;
  1475.   property B0: single read GetB0 write SetB0;
  1476.   property B1: single read GetB1 write SetB1;
  1477.   property B2: single read GetB2 write SetB2;
  1478.   property B3: single read GetB3 write SetB3;
  1479.   property B4: single read GetB4 write SetB4;
  1480.   property A0: single read GetA0 write SetA0;
  1481.   property A1: single read GetA1 write SetA1;
  1482.   property A2: single read GetA2 write SetA2;
  1483.   property A3: single read GetA3 write SetA3;
  1484.   property A4: single read GetA4 write SetA4;
  1485.  end;
  1486.  TSWFConvolutionFilter = class (TSWFFilter)
  1487.  public
  1488.   constructor Create;
  1489.   destructor Destroy; override;
  1490.   procedure Assign(Source: TSWFFilter); override;
  1491.   procedure ReadFromStream(be: TBitsEngine); override;
  1492.   procedure WriteToStream(be: TBitsEngine); override;
  1493. {$IFDEF XMLSupport}
  1494.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1495.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1496. {$ENDIF}
  1497.   property Bias: single read FBias write FBias;
  1498.   property Clamp: Boolean read FClamp write FClamp;
  1499.   property DefaultColor: TSWFRGBA read FDefaultColor;
  1500.   property Divisor: single read FDivisor write FDivisor;
  1501.   property Matrix[Index: Integer]: single read GetMatrix write SetMatrix;
  1502.   property MatrixX: byte read FMatrixX write FMatrixX;
  1503.   property MatrixY: byte read FMatrixY write FMatrixY;
  1504.   property PreserveAlpha: Boolean read FPreserveAlpha write FPreserveAlpha;
  1505.  end;
  1506.  TSWFBlurFilter = class (TSWFFilter)
  1507.  public
  1508.   constructor Create; virtual;
  1509.   procedure Assign(Source: TSWFFilter); override;
  1510.   procedure ReadFromStream(be: TBitsEngine); override;
  1511.   procedure WriteToStream(be: TBitsEngine); override;
  1512. {$IFDEF XMLSupport}
  1513.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1514.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1515. {$ENDIF}
  1516.   property BlurX: single read FBlurX write FBlurX;
  1517.   property BlurY: single read FBlurY write FBlurY;
  1518.   property Passes: byte read FPasses write FPasses;
  1519.  end;
  1520.  TSWFGlowFilter = class(TSWFBlurFilter)
  1521.  public
  1522.   constructor Create; override;
  1523.   destructor Destroy; override;
  1524.   procedure Assign(Source: TSWFFilter); override;
  1525.   procedure ReadFromStream(be: TBitsEngine); override;
  1526.   procedure WriteToStream(be: TBitsEngine); override;
  1527. {$IFDEF XMLSupport}
  1528.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1529.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1530. {$ENDIF}
  1531.   property GlowColor: TSWFRGBA read FGlowColor;
  1532.   property InnerGlow: Boolean read FInnerGlow write FInnerGlow;
  1533.   property Knockout: Boolean read FKnockout write FKnockout;
  1534.   property CompositeSource: Boolean read FCompositeSource write FCompositeSource;
  1535.   property Strength: single read FStrength write FStrength;
  1536.  end;
  1537.  TSWFDropShadowFilter = class (TSWFBlurFilter)
  1538.  public
  1539.   constructor Create; override;
  1540.   destructor Destroy; override;
  1541.   procedure Assign(Source: TSWFFilter); override;
  1542.   procedure ReadFromStream(be: TBitsEngine); override;
  1543.   procedure WriteToStream(be: TBitsEngine); override;
  1544. {$IFDEF XMLSupport}
  1545.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1546.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1547. {$ENDIF}
  1548.   property Angle: single read FAngle write FAngle;
  1549.   property CompositeSource: Boolean read FCompositeSource write FCompositeSource;
  1550.   property Distance: single read FDistance write FDistance;
  1551.   property DropShadowColor: TSWFRGBA read FDropShadowColor;
  1552.   property InnerShadow: Boolean read FInnerShadow write FInnerShadow;
  1553.   property Knockout: Boolean read FKnockout write FKnockout;
  1554.   property Strength: single read FStrength write FStrength;
  1555.  end;
  1556.  TSWFBevelFilter = class(TSWFBlurFilter)
  1557.  public
  1558.   constructor Create; override;
  1559.   destructor Destroy; override;
  1560.   procedure Assign(Source: TSWFFilter); override;
  1561.   procedure ReadFromStream(be: TBitsEngine); override;
  1562.   procedure WriteToStream(be: TBitsEngine); override;
  1563. {$IFDEF XMLSupport}
  1564.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1565.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1566. {$ENDIF}
  1567.   property Angle: single read FAngle write FAngle;
  1568.   property CompositeSource: Boolean read FCompositeSource write FCompositeSource;
  1569.   property Distance: single read FDistance write FDistance;
  1570.   property ShadowColor: TSWFRGBA read FShadowColor;
  1571.   property InnerShadow: Boolean read FInnerShadow write FInnerShadow;
  1572.   property Knockout: Boolean read FKnockout write FKnockout;
  1573.   property HighlightColor: TSWFRGBA read FHighlightColor;
  1574.   property OnTop: Boolean read FOnTop write FOnTop;
  1575.   property Strength: single read FStrength write FStrength;
  1576.  end;
  1577.  TSWFGradientRec = record
  1578.    color: recRGBA;
  1579.    ratio: byte;
  1580.  end;
  1581.  TSWFGradientGlowFilter = class(TSWFBlurFilter)
  1582.  public
  1583.   constructor Create; override;
  1584.   destructor Destroy; override;
  1585.   procedure Assign(Source: TSWFFilter); override;
  1586.   procedure ReadFromStream(be: TBitsEngine); override;
  1587.   procedure WriteToStream(be: TBitsEngine); override;
  1588. {$IFDEF XMLSupport}
  1589.   procedure ReadFromXMLNode(Node: IXMLNode); override;
  1590.   procedure WriteToXMLNode(Node: IXMLNode); override;
  1591. {$ENDIF}
  1592.   property Angle: single read FAngle write FAngle;
  1593.   property CompositeSource: Boolean read FCompositeSource write FCompositeSource;
  1594.   property Distance: single read FDistance write FDistance;
  1595.   property Gradient[Index: byte]: TSWFGradientRec read GetGradient;
  1596.   property GradientColor[Index: byte]: TSWFRGBA read GetGradientColor;
  1597.   property GradientRatio[Index: byte]: Byte read GetGradientRatio write SetGradientRatio;
  1598.   property InnerShadow: Boolean read FInnerShadow write FInnerShadow;
  1599.   property Knockout: Boolean read FKnockout write FKnockout;
  1600.   property NumColors: byte read FNumColors write SetNumColors;
  1601.   property OnTop: Boolean read FOnTop write FOnTop;
  1602.   property Strength: single read FStrength write FStrength;
  1603.  end;
  1604.  TSWFGradientBevelFilter = class (TSWFGradientGlowFilter)
  1605.  public
  1606.   constructor Create; override;
  1607.  end;
  1608.  TSWFFilterList = class (TObjectList)
  1609.  public
  1610.   function AddFilter(id: TSwfFilterID): TSWFFilter;
  1611.   procedure ReadFromStream(be: TBitsEngine);
  1612.   procedure WriteToStream(be: TBitsEngine);
  1613. {$IFDEF XMLSupport}
  1614.   procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings);
  1615.   procedure WriteToXMLNode(Node: IXMLNode);
  1616. {$ENDIF}
  1617.   property Filter[Index: Integer]: TSWFFilter read GetFilter;
  1618.  end;
  1619.  TSWFPlaceObject3 = class(TSWFPlaceObject2)
  1620.  public
  1621.   constructor Create;
  1622.   destructor Destroy; override;
  1623.   procedure Assign(Source: TBasedSWFObject); override;
  1624.   function MinVersion: Byte; override;
  1625. {$IFDEF XMLSupport}
  1626.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1627.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1628. {$ENDIF}
  1629.   property BlendMode: TSWFBlendMode read FBlendMode write FBlendMode;
  1630.   property _ClassName: string read FClassName write SetClassName;
  1631.   property PlaceFlagHasCacheAsBitmap: Boolean read FPlaceFlagHasCacheAsBitmap
  1632.       write FPlaceFlagHasCacheAsBitmap;
  1633.   property PlaceFlagHasBlendMode: Boolean read FPlaceFlagHasBlendMode write
  1634.       FPlaceFlagHasBlendMode;
  1635.   property PlaceFlagHasImage: boolean read FPlaceFlagHasImage write FPlaceFlagHasImage;
  1636.   property PlaceFlagHasClassName: boolean read FPlaceFlagHasClassName write FPlaceFlagHasClassName;
  1637.   property PlaceFlagHasFilterList: Boolean read FPlaceFlagHasFilterList write
  1638.       FPlaceFlagHasFilterList;
  1639.   property SaveAsPO2: boolean read FSaveAsPO2 write FSaveAsPO2;
  1640.   property SurfaceFilterList: TSWFFilterList read GetSurfaceFilterList;
  1641.  end;
  1642.   TSWFRemoveObject = class (TSWFObject)
  1643.   public
  1644.     constructor Create;
  1645.     procedure Assign(Source: TBasedSWFObject); override;
  1646.     procedure ReadFromStream(be: TBitsEngine); override;
  1647.     procedure WriteTagBody(be: TBitsEngine); override;
  1648. {$IFDEF XMLSupport}
  1649.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1650.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1651. {$ENDIF}
  1652.     property CharacterID: Word read FCharacterID write FCharacterID;
  1653.     property Depth: Word read FDepth write FDepth;
  1654.   end;
  1655.   TSWFRemoveObject2 = class (TSWFObject)
  1656.   public
  1657.     constructor Create;
  1658.     procedure Assign(Source: TBasedSWFObject); override;
  1659.     function MinVersion: Byte; override;
  1660.     procedure ReadFromStream(be: TBitsEngine); override;
  1661.     procedure WriteTagBody(be: TBitsEngine); override;
  1662. {$IFDEF XMLSupport}
  1663.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1664.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1665. {$ENDIF}
  1666.     property depth: Word read Fdepth write Fdepth;
  1667.   end;
  1668.   TSWFShowFrame = class (TSWFObject)
  1669.   public
  1670.     constructor Create;
  1671.   end;
  1672. // =========================================================
  1673. //                        Shape
  1674. // =========================================================
  1675.   TSWFFillStyle = class (TObject)
  1676.   public
  1677.     procedure Assign(Source: TSWFFillStyle); virtual;
  1678.     procedure ReadFromStream(be: TBitsEngine); virtual; abstract;
  1679.     procedure WriteToStream(be: TBitsEngine); virtual; abstract;
  1680. {$IFDEF XMLSupport}
  1681.     procedure ReadFromXMLNode(Node: IXMLNode); virtual; abstract;
  1682.     procedure WriteToXMLNode(Node: IXMLNode); virtual; abstract;
  1683. {$ENDIF}
  1684.     property hasAlpha: Boolean read FhasAlpha write FhasAlpha;
  1685.     property SWFFillType: TSWFFillType read FSWFFillType write FSWFFillType;
  1686.   end;
  1687.   TSWFLineStyle = class (TObject)
  1688.   public
  1689.     constructor Create; virtual;
  1690.     destructor Destroy; override;
  1691.     procedure Assign(Source: TSWFLineStyle); virtual;
  1692.     procedure ReadFromStream(be: TBitsEngine); virtual;
  1693.     procedure WriteToStream(be: TBitsEngine); virtual;
  1694. {$IFDEF XMLSupport}
  1695.     procedure ReadFromXMLNode(Node: IXMLNode); virtual;
  1696.     procedure WriteToXMLNode(Node: IXMLNode); virtual;
  1697. {$ENDIF}
  1698.     property Color: TSWFRGBA read FColor;
  1699.     property Width: Word read FWidth write FWidth;
  1700.   end;
  1701.   TSWFLineStyle2 = class (TSWFLineStyle)
  1702.   public
  1703.     constructor Create; override;
  1704.     destructor Destroy; override;
  1705.     procedure Assign(Source: TSWFLineStyle); override;
  1706.     function GetFillStyle(style: integer): TSWFFillStyle;
  1707.     procedure ReadFromStream(be: TBitsEngine); override;
  1708.     procedure WriteToStream(be: TBitsEngine); override;
  1709. {$IFDEF XMLSupport}
  1710.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  1711.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1712. {$ENDIF}
  1713.     property HasFillFlag: Boolean read FHasFillFlag write FHasFillFlag;
  1714.     property StartCapStyle: byte read FStartCapStyle write FStartCapStyle;
  1715.     property JoinStyle: byte read FJoinStyle write FJoinStyle;
  1716.     property NoClose: Boolean read FNoClose write FNoClose;
  1717.     property NoHScaleFlag: Boolean read FNoHScaleFlag write FNoHScaleFlag;
  1718.     property NoVScaleFlag: Boolean read FNoVScaleFlag write FNoVScaleFlag;
  1719.     property PixelHintingFlag: Boolean read FPixelHintingFlag write
  1720.         FPixelHintingFlag;
  1721.     property EndCapStyle: byte read FEndCapStyle write FEndCapStyle;
  1722.     property MiterLimitFactor: single read FMiterLimitFactor write
  1723.         FMiterLimitFactor;
  1724.   end;
  1725.   TSWFColorFill = class (TSWFFillStyle)
  1726.   public
  1727.     constructor Create;
  1728.     destructor Destroy; override;
  1729.     procedure Assign(Source: TSWFFillStyle); override;
  1730.     procedure ReadFromStream(be: TBitsEngine); override;
  1731.     procedure WriteToStream(be: TBitsEngine); override;
  1732. {$IFDEF XMLSupport}
  1733.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  1734.     procedure WriteToXMLNode(Node: IXMLNode); override;
  1735. {$ENDIF}
  1736.     property Color: TSWFRGBA read FColor;
  1737.   end;
  1738.   TSWFImageFill = class (TSWFFillStyle)
  1739.   public
  1740.     constructor Create;
  1741.     destructor Destroy; override;
  1742.     procedure Assign(Source: TSWFFillStyle); override;
  1743.     procedure ReadFromStream(be: TBitsEngine); override;
  1744.     procedure ScaleTo(Frame: TRect; W, H: word);
  1745.     procedure WriteToStream(be: TBitsEngine); override;
  1746. {$IFDEF XMLSupport}
  1747.    procedure ReadFromXMLNode(Node: IXMLNode); override;
  1748.    procedure WriteToXMLNode(Node: IXMLNode); override;
  1749. {$ENDIF}
  1750.     property ImageID: Word read FImageID write FImageID;
  1751.     property Matrix: TSWFMatrix read FMatrix;
  1752.   end;
  1753.  TSWFBaseGradientFill = class(TSWFFillStyle)
  1754.  public
  1755.    constructor Create;
  1756.    destructor Destroy; override;
  1757.    procedure Assign(Source: TSWFFillStyle); override;
  1758.    procedure ReadFromStream(be: TBitsEngine); override;
  1759.    procedure WriteToStream(be: TBitsEngine); override;
  1760. {$IFDEF XMLSupport}
  1761.    procedure ReadFromXMLNode(Node: IXMLNode); override;
  1762.    procedure WriteToXMLNode(Node: IXMLNode); override;
  1763. {$ENDIF}
  1764.    property Count: Byte read FCount write FCount;
  1765.    property Gradient[Index: byte]: TSWFGradientRec read GetGradient;
  1766.    property GradientColor[Index: Integer]: TSWFRGBA read GetGradientColor;
  1767.    property GradientRatio[Index: Integer]: Byte read GetGradientRatio write SetGradientRatio;
  1768.  end;
  1769.  TSWFGradientFill = class (TSWFBaseGradientFill)
  1770.  public
  1771.    constructor Create;
  1772.    destructor Destroy; override;
  1773.    procedure Assign(Source: TSWFFillStyle); override;
  1774.    procedure ReadFromStream(be: TBitsEngine); override;
  1775.    procedure ScaleTo(Frame: TRect);
  1776.    procedure WriteToStream(be: TBitsEngine); override;
  1777. {$IFDEF XMLSupport}
  1778.    procedure ReadFromXMLNode(Node: IXMLNode); override;
  1779.    procedure WriteToXMLNode(Node: IXMLNode); override;
  1780. {$ENDIF}
  1781.    property Matrix: TSWFMatrix read FMatrix;
  1782.  end;
  1783.  TSWFFocalGradientFill = class(TSWFGradientFill)
  1784.  public
  1785.   constructor Create;
  1786.   procedure Assign(Source: TSWFFillStyle); override;
  1787.   procedure ReadFromStream(be: TBitsEngine); override;
  1788.   procedure WriteToStream(be: TBitsEngine); override;
  1789. {$IFDEF XMLSupport}
  1790.    procedure ReadFromXMLNode(Node: IXMLNode); override;
  1791.    procedure WriteToXMLNode(Node: IXMLNode); override;
  1792. {$ENDIF}
  1793.   property FocalPoint: single read GetFocalPoint write SetFocalPoint;
  1794.   property InterpolationMode;
  1795.   property SpreadMode;
  1796.  end;
  1797.   TSWFShapeRecord = class (TObject)
  1798.   public
  1799.     procedure Assign(Source: TSWFShapeRecord); virtual;
  1800.     procedure WriteToStream(be: TBitsEngine); virtual; abstract;
  1801.     property ShapeRecType: TShapeRecType read FShapeRecType write FShapeRecType;
  1802.   end;
  1803.   TSWFEndShapeRecord = class (TSWFShapeRecord)
  1804.   public
  1805.     constructor Create;
  1806.     procedure WriteToStream(be: TBitsEngine); override;
  1807.   end;
  1808.   TSWFStraightEdgeRecord = class (TSWFShapeRecord)
  1809.   public
  1810.     constructor Create;
  1811.     procedure Assign(Source: TSWFShapeRecord); override;
  1812.     procedure WriteToStream(be: TBitsEngine); override;
  1813.     property X: LongInt read FX write FX;
  1814.     property Y: LongInt read FY write FY;
  1815.   end;
  1816.   TSWFStyleChangeRecord = class (TSWFStraightEdgeRecord)
  1817.   public
  1818.     constructor Create;
  1819.     destructor Destroy; override;
  1820.     procedure Assign(Source: TSWFShapeRecord); override;
  1821.     procedure WriteToStream(be: TBitsEngine); override;
  1822.     property Fill0Id: Word read FFill0Id write SetFill0Id;
  1823.     property Fill1Id: Word read FFill1Id write SetFill1Id;
  1824.     property LineId: Word read FLineId write SetLineId;
  1825.     property NewFillStyles: TObjectList read GetNewFillStyles;
  1826.     property NewLineStyles: TObjectList read GetNewLineStyles;
  1827.     property StateFillStyle0: Boolean read FStateFillStyle0 write FStateFillStyle0;
  1828.     property StateFillStyle1: Boolean read FStateFillStyle1 write FStateFillStyle1;
  1829.     property StateLineStyle: Boolean read FStateLineStyle write FStateLineStyle;
  1830.     property StateMoveTo: Boolean read FStateMoveTo write FStateMoveTo;
  1831.     property StateNewStyles: Boolean read FStateNewStyles write FStateNewStyles;
  1832.   end;
  1833.   TSWFCurvedEdgeRecord = class (TSWFShapeRecord)
  1834.   public
  1835.     constructor Create;
  1836.     procedure Assign(Source: TSWFShapeRecord); override;
  1837.     procedure WriteToStream(be: TBitsEngine); override;
  1838.     property AnchorX: LongInt read FAnchorX write FAnchorX;
  1839.     property AnchorY: LongInt read FAnchorY write FAnchorY;
  1840.     property ControlX: LongInt read FControlX write FControlX;
  1841.     property ControlY: LongInt read FControlY write FControlY;
  1842.   end;
  1843.   TSWFDefineShape = class (TSWFObject)
  1844.   public
  1845.     constructor Create; virtual;
  1846.     destructor Destroy; override;
  1847.     procedure Assign(Source: TBasedSWFObject); override;
  1848.     procedure ReadFromStream(be: TBitsEngine); override;
  1849.     procedure WriteTagBody(be: TBitsEngine); override;
  1850. {$IFDEF XMLSupport}
  1851.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1852.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1853. {$ENDIF}
  1854.     property EdgeRecord[index: longint]: TSWFShapeRecord read GetEdgeRecord;
  1855.     property Edges: TObjectList read FEdges write FEdges;
  1856.     property FillStyles: TObjectList read FFillStyles;
  1857.     property hasAlpha: Boolean read FhasAlpha write FhasAlpha;
  1858.     property LineStyles: TObjectList read FLineStyles;
  1859.     property ShapeBounds: TSWFRect read FShapeBounds;
  1860.     property ShapeId: Word read FShapeId write FShapeId;
  1861.   end;
  1862.   TSWFDefineShape2 = class (TSWFDefineShape)
  1863.   public
  1864.     constructor Create; override;
  1865.     function MinVersion: Byte; override;
  1866.   end;
  1867.   TSWFDefineShape3 = class (TSWFDefineShape)
  1868.   public
  1869.     constructor Create; override;
  1870.     function MinVersion: Byte; override;
  1871.   end;
  1872.   TSWFDefineShape4 = class (TSWFDefineShape)
  1873.   public
  1874.     constructor Create; override;
  1875.     destructor Destroy; override;
  1876.     procedure Assign(Source: TBasedSWFObject); override;
  1877.     function MinVersion: Byte; override;
  1878. {$IFDEF XMLSupport}
  1879.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1880.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1881. {$ENDIF}
  1882.     property EdgeBounds: TSWFRect read FEdgeBounds;
  1883.     property UsesNonScalingStrokes: Boolean read FUsesNonScalingStrokes write
  1884.         FUsesNonScalingStrokes;
  1885.     property UsesScalingStrokes: Boolean read FUsesScalingStrokes write
  1886.         FUsesScalingStrokes;
  1887.   end;
  1888. // ==========================================================
  1889. //                      Bitmaps
  1890. // ==========================================================
  1891.   TSWFDataObject = class (TSWFObject)
  1892.   public
  1893.     constructor Create; virtual;
  1894.     destructor Destroy; override;
  1895.     procedure Assign(Source: TBasedSWFObject); override;
  1896.     procedure CopyFrom(Source: TBasedSWFObject); override;
  1897.     property Data: TStream read GetData write SetData;
  1898.     property DataSize: Longint read FDataSize write SetDataSize;
  1899.     property OnDataWrite: TSWFTagEvent read FOnDataWrite write FOnDataWrite;
  1900.     property SelfDestroy: Boolean read FSelfDestroy write FSelfDestroy;
  1901.   end;
  1902.   TSWFDefineBinaryData = class (TSWFDataObject)
  1903.   public
  1904.     constructor Create; override;
  1905.     procedure Assign(Source: TBasedSWFObject); override;
  1906.     procedure ReadFromStream(be: TBitsEngine); override;
  1907.     procedure WriteTagBody(be: TBitsEngine); override;
  1908. {$IFDEF XMLSupport}
  1909.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1910.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1911. {$ENDIF}
  1912.     property CharacterID: word read FCharacterID write FCharacterID;
  1913.   end;
  1914.   TSWFImageTag = class (TSWFDataObject)
  1915.   public
  1916.     procedure Assign(Source: TBasedSWFObject); override;
  1917.     property CharacterID: Word read FCharacterID write FCharacterID;
  1918.   end;
  1919.   TSWFDefineBits = class (TSWFImageTag)
  1920.   public
  1921.     constructor Create; override;
  1922.     procedure ReadFromStream(be: TBitsEngine); override;
  1923.     procedure WriteTagBody(be: TBitsEngine); override;
  1924. {$IFDEF XMLSupport}
  1925.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1926.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1927. {$ENDIF}
  1928.   end;
  1929.   TSWFJPEGTables = class (TSWFDataObject)
  1930.   public
  1931.     constructor Create; override;
  1932.     procedure ReadFromStream(be: TBitsEngine); override;
  1933.     procedure WriteTagBody(be: TBitsEngine); override;
  1934. {$IFDEF XMLSupport}
  1935.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1936.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1937. {$ENDIF}
  1938.   end;
  1939.   TSWFDefineBitsJPEG2 = class (TSWFDefineBits)
  1940.   public
  1941.     constructor Create; override;
  1942.     function MinVersion: Byte; override;
  1943.     procedure WriteTagBody(be: TBitsEngine); override;
  1944.   end;
  1945.   TSWFDefineBitsJPEG3 = class (TSWFDefineBitsJPEG2)
  1946.   public
  1947.     constructor Create; override;
  1948.     destructor Destroy; override;
  1949.     procedure Assign(Source: TBasedSWFObject); override;
  1950.     procedure CopyFrom(Source: TBasedSWFObject); override;
  1951.     function MinVersion: Byte; override;
  1952.     procedure ReadFromStream(be: TBitsEngine); override;
  1953.     procedure WriteTagBody(be: TBitsEngine); override;
  1954. {$IFDEF XMLSupport}
  1955.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1956.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1957. {$ENDIF}
  1958.     property AlphaData: TStream read GetAlphaData write SetAlphaData;
  1959.     property AlphaDataSize: LongInt read FAlphaDataSize write FAlphaDataSize;
  1960.     property OnAlphaDataWrite: TSWFTagEvent read FOnAlphaDataWrite write FOnAlphaDataWrite;
  1961.     property SelfAlphaDestroy: Boolean read FSelfAlphaDestroy write FSelfAlphaDestroy;
  1962.   end;
  1963.   TSWFDefineBitsLossless = class (TSWFImageTag)
  1964.   public
  1965.     constructor Create; override;
  1966.     procedure Assign(Source: TBasedSWFObject); override;
  1967.     function MinVersion: Byte; override;
  1968.     procedure ReadFromStream(be: TBitsEngine); override;
  1969.     procedure WriteTagBody(be: TBitsEngine); override;
  1970. {$IFDEF XMLSupport}
  1971.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1972.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  1973. {$ENDIF}
  1974.     property BitmapColorTableSize: Byte read FBitmapColorTableSize write FBitmapColorTableSize;
  1975.     property BitmapFormat: Byte read FBitmapFormat write FBitmapFormat;
  1976.     property BitmapHeight: Word read FBitmapHeight write FBitmapHeight;
  1977.     property BitmapWidth: Word read FBitmapWidth write FBitmapWidth;
  1978.   end;
  1979.   TSWFDefineBitsLossless2 = class (TSWFDefineBitsLossless)
  1980.   public
  1981.     constructor Create; override;
  1982.     function MinVersion: Byte; override;
  1983.   end;
  1984. // ==========================================================
  1985. //                      Morphing
  1986. // ==========================================================
  1987.  TSWFMorphGradientRec = record
  1988.    StartColor,
  1989.    EndColor: recRGBA;
  1990.    StartRatio,
  1991.    EndRatio: byte;
  1992.  end;
  1993.   TSWFMorphLineStyle = class (TObject)
  1994.   public
  1995.     constructor Create; virtual;
  1996.     destructor Destroy; override;
  1997.     procedure Assign(Source: TSWFMorphLineStyle);
  1998.     procedure ReadFromStream(be: TBitsEngine); virtual;
  1999.     procedure WriteToStream(be: TBitsEngine); virtual;
  2000. {$IFDEF XMLSupport}
  2001.     procedure ReadFromXMLNode(Node: IXMLNode); virtual;
  2002.     procedure WriteToXMLNode(Node: IXMLNode); virtual;
  2003. {$ENDIF}
  2004.     property EndColor: TSWFRGBA read FEndColor;
  2005.     property EndWidth: Word read FEndWidth write FEndWidth;
  2006.     property StartColor: TSWFRGBA read FStartColor;
  2007.     property StartWidth: Word read FStartWidth write FStartWidth;
  2008.   end;
  2009.   TSWFMorphLineStyle2 = class (TSWFMorphLineStyle)
  2010.   public
  2011.    destructor Destroy; override;
  2012.    function GetFillStyle(style: integer): TSWFFillStyle;
  2013.    procedure ReadFromStream(be: TBitsEngine); override;
  2014.    procedure WriteToStream(be: TBitsEngine); override;
  2015. {$IFDEF XMLSupport}
  2016.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  2017.     procedure WriteToXMLNode(Node: IXMLNode); override;
  2018. {$ENDIF}
  2019.    property EndCapStyle: byte read FEndCapStyle write FEndCapStyle;
  2020.    property HasFillFlag: Boolean read FHasFillFlag write FHasFillFlag;
  2021.    property JoinStyle: byte read FJoinStyle write FJoinStyle;
  2022.    property MiterLimitFactor: single read FMiterLimitFactor write
  2023.        FMiterLimitFactor;
  2024.    property NoClose: Boolean read FNoClose write FNoClose;
  2025.    property NoHScaleFlag: Boolean read FNoHScaleFlag write FNoHScaleFlag;
  2026.    property NoVScaleFlag: Boolean read FNoVScaleFlag write FNoVScaleFlag;
  2027.    property PixelHintingFlag: Boolean read FPixelHintingFlag write
  2028.        FPixelHintingFlag;
  2029.    property StartCapStyle: byte read FStartCapStyle write FStartCapStyle;
  2030.   end;
  2031.   TSWFMorphFillStyle = class (TObject)
  2032.   public
  2033.     procedure Assign(Source: TSWFMorphFillStyle); virtual; abstract;
  2034.     procedure ReadFromStream(be: TBitsEngine); virtual; abstract;
  2035.     procedure WriteToStream(be: TBitsEngine); virtual; abstract;
  2036. {$IFDEF XMLSupport}
  2037.     procedure ReadFromXMLNode(Node: IXMLNode); virtual; abstract;
  2038.     procedure WriteToXMLNode(Node: IXMLNode); virtual; abstract;
  2039. {$ENDIF}
  2040.     property SWFFillType: TSWFFillType read FSWFFillType write FSWFFillType;
  2041.   end;
  2042.   TSWFMorphColorFill = class (TSWFMorphFillStyle)
  2043.   public
  2044.     constructor Create;
  2045.     destructor Destroy; override;
  2046.     procedure Assign(Source: TSWFMorphFillStyle); override;
  2047.     procedure ReadFromStream(be: TBitsEngine); override;
  2048.     procedure WriteToStream(be: TBitsEngine); override;
  2049. {$IFDEF XMLSupport}
  2050.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  2051.     procedure WriteToXMLNode(Node: IXMLNode); override;
  2052. {$ENDIF}
  2053.     property EndColor: TSWFRGBA read FEndColor;
  2054.     property StartColor: TSWFRGBA read FStartColor;
  2055.   end;
  2056.   TSWFMorphGradientFill = class (TSWFMorphFillStyle)
  2057.   public
  2058.     constructor Create; virtual;
  2059.     destructor Destroy; override;
  2060.     procedure Assign(Source: TSWFMorphFillStyle); override;
  2061.     procedure ReadFromStream(be: TBitsEngine); override;
  2062.     procedure WriteToStream(be: TBitsEngine); override;
  2063. {$IFDEF XMLSupport}
  2064.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  2065.     procedure WriteToXMLNode(Node: IXMLNode); override;
  2066. {$ENDIF}
  2067.     property Count: Byte read FCount write FCount;
  2068.     property EndColor[Index: Integer]: TSWFRGBA read GetEndColor;
  2069.     property EndGradient[Index: byte]: TSWFGradientRec read GetEndGradient;
  2070.     property EndMatrix: TSWFMatrix read FEndMatrix;
  2071.     property EndRatio[Index: Integer]: Byte read GetEndRatio write SetEndRatio;
  2072.     property Gradient[Index: byte]: TSWFMorphGradientRec read GetGradient;
  2073.     property StartColor[Index: Integer]: TSWFRGBA read GetStartColor;
  2074.     property StartGradient[Index: byte]: TSWFGradientRec read GetStartGradient;
  2075.     property StartMatrix: TSWFMatrix read FStartMatrix;
  2076.     property StartRatio[Index: Integer]: Byte read GetStartRatio write SetStartRatio;
  2077.   end;
  2078.   TSWFMorphFocalGradientFill = class (TSWFMorphGradientFill)
  2079.   public
  2080.     constructor Create; override;
  2081.     procedure ReadFromStream(be: TBitsEngine); override;
  2082.     procedure WriteToStream(be: TBitsEngine); override;
  2083. {$IFDEF XMLSupport}
  2084.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  2085.     procedure WriteToXMLNode(Node: IXMLNode); override;
  2086. {$ENDIF}
  2087.     property StartFocalPoint: single read GetStartFocalPoint write SetStartFocalPoint;
  2088.     property EndFocalPoint: single read GetEndFocalPoint write SetEndFocalPoint;
  2089.     property InterpolationMode;
  2090.     property SpreadMode;
  2091.   end;
  2092.   TSWFMorphImageFill = class (TSWFMorphFillStyle)
  2093.   public
  2094.     constructor Create;
  2095.     destructor Destroy; override;
  2096.     procedure Assign(Source: TSWFMorphFillStyle); override;
  2097.     procedure ReadFromStream(be: TBitsEngine); override;
  2098.     procedure WriteToStream(be: TBitsEngine); override;
  2099. {$IFDEF XMLSupport}
  2100.     procedure ReadFromXMLNode(Node: IXMLNode); override;
  2101.     procedure WriteToXMLNode(Node: IXMLNode); override;
  2102. {$ENDIF}
  2103.     property EndMatrix: TSWFMatrix read FEndMatrix;
  2104.     property ImageID: Word read FImageID write FImageID;
  2105.     property StartMatrix: TSWFMatrix read FStartMatrix;
  2106.   end;
  2107.   TSWFDefineMorphShape = class (TSWFObject)
  2108.   public
  2109.     constructor Create; virtual;
  2110.     destructor Destroy; override;
  2111.     procedure Assign(Source: TBasedSWFObject); override;
  2112.     function MinVersion: Byte; override;
  2113.     procedure ReadFromStream(be: TBitsEngine); override;
  2114.     procedure WriteTagBody(be: TBitsEngine); override;
  2115. {$IFDEF XMLSupport}
  2116.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2117.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2118. {$ENDIF}
  2119.     property CharacterID: Word read FCharacterID write FCharacterID;
  2120.     property EndBounds: TSWFRect read FEndBounds;
  2121.     property EndEdgeRecord[Index: Integer]: TSWFShapeRecord read GetEndEdgeRecord;
  2122.     property EndEdges: TObjectList read FEndEdges;
  2123.     property MorphFillStyles: TObjectList read FMorphFillStyles;
  2124.     property MorphLineStyles: TObjectList read FMorphLineStyles;
  2125.     property StartBounds: TSWFRect read FStartBounds;
  2126.     property StartEdgeRecord[Index: Integer]: TSWFShapeRecord read GetStartEdgeRecord;
  2127.     property StartEdges: TObjectList read FStartEdges;
  2128.   end;
  2129.   TSWFDefineMorphShape2 = class (TSWFDefineMorphShape)
  2130.   public
  2131.     constructor Create; override;
  2132.     destructor Destroy; override;
  2133.     procedure Assign(Source: TBasedSWFObject); override;
  2134.     property StartEdgeBounds: TSWFRect read FStartEdgeBounds;
  2135.     property EndEdgeBounds: TSWFRect read FEndEdgeBounds;
  2136.     property UsesNonScalingStrokes: Boolean read FUsesNonScalingStrokes write FUsesNonScalingStrokes;
  2137.     property UsesScalingStrokes: Boolean read FUsesScalingStrokes write FUsesScalingStrokes;
  2138.   end;
  2139. // ==========================================================
  2140. //                        TEXT
  2141. // ==========================================================
  2142.   TSWFDefineFont = class (TSWFObject)
  2143.   public
  2144.     constructor Create; virtual;
  2145.     destructor Destroy; override;
  2146.     procedure Assign(Source: TBasedSWFObject); override;
  2147.     procedure ReadFromStream(be: TBitsEngine); override;
  2148.     procedure WriteTagBody(be: TBitsEngine); override;
  2149. {$IFDEF XMLSupport}
  2150.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2151.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2152. {$ENDIF}
  2153.     property FontID: Word read FFontID write FFontID;
  2154.     property GlyphShapeTable: TObjectList read FGlyphShapeTable write FGlyphShapeTable;
  2155.   end;
  2156.   TSWFDefineFontInfo = class (TSWFObject)
  2157.   public
  2158.     constructor Create; virtual;
  2159.     destructor Destroy; override;
  2160.     procedure Assign(Source: TBasedSWFObject); override;
  2161.     procedure ReadFromStream(be: TBitsEngine); override;
  2162.     procedure WriteTagBody(be: TBitsEngine); override;
  2163. {$IFDEF XMLSupport}
  2164.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2165.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2166. {$ENDIF}
  2167.     property CodeTable: TList read FCodeTable;
  2168.     property FontFlagsANSI: Boolean read FFontFlagsANSI write FFontFlagsANSI;
  2169.     property FontFlagsBold: Boolean read FFontFlagsBold write FFontFlagsBold;
  2170.     property FontFlagsItalic: Boolean read FFontFlagsItalic write FFontFlagsItalic;
  2171.     property FontFlagsShiftJIS: Boolean read FFontFlagsShiftJIS write FFontFlagsShiftJIS;
  2172.     property FontFlagsSmallText: Boolean read FFontFlagsSmallText write FFontFlagsSmallText;
  2173.     property FontFlagsWideCodes: Boolean read FFontFlagsWideCodes write FFontFlagsWideCodes;
  2174.     property FontID: Word read FFontID write FFontID;
  2175.     property FontName: string read FFontName write FFontName;
  2176.     property SWFVersion: Byte read FSWFVersion write FSWFVersion;
  2177.   end;
  2178.   TSWFDefineFontInfo2 = class (TSWFDefineFontInfo)
  2179.   public
  2180.     constructor Create; override;
  2181.     procedure Assign(Source: TBasedSWFObject); override;
  2182.     function MinVersion: Byte; override;
  2183.     procedure ReadFromStream(be: TBitsEngine); override;
  2184. {$IFDEF XMLSupport}
  2185.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2186.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2187. {$ENDIF}
  2188.     procedure WriteTagBody(be: TBitsEngine); override;
  2189.     property LanguageCode: Byte read FLanguageCode write FLanguageCode;
  2190.   end;
  2191.   TSWFKerningRecord = class (TObject)
  2192.   public
  2193.     procedure Assign(source: TSWFKerningRecord);
  2194.     property FontKerningAdjustment: Integer read FFontKerningAdjustment write FFontKerningAdjustment;
  2195.     property FontKerningCode1: Word read FFontKerningCode1 write FFontKerningCode1;
  2196.     property FontKerningCode2: Word read FFontKerningCode2 write FFontKerningCode2;
  2197.   end;
  2198.   TSWFDefineFont2 = class (TSWFDefineFont)
  2199.   public
  2200.     constructor Create; override;
  2201.     destructor Destroy; override;
  2202.     procedure Assign(Source: TBasedSWFObject); override;
  2203.     function MinVersion: Byte; override;
  2204.     procedure ReadFromStream(be: TBitsEngine); override;
  2205.     procedure WriteTagBody(be: TBitsEngine); override;
  2206. {$IFDEF XMLSupport}
  2207.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2208.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2209. {$ENDIF}
  2210.     property CodeTable: TList read FCodeTable;
  2211.     property FontAdvanceTable: TList read FFontAdvanceTable;
  2212.     property FontAscent: Word read FFontAscent write FFontAscent;
  2213.     property FontBoundsTable: TObjectList read FFontBoundsTable;
  2214.     property FontDescent: Word read FFontDescent write FFontDescent;
  2215.     property FontFlagsANSI: Boolean read FFontFlagsANSI write FFontFlagsANSI;
  2216.     property FontFlagsBold: Boolean read FFontFlagsBold write FFontFlagsBold;
  2217.     property FontFlagsHasLayout: Boolean read FFontFlagsHasLayout write FFontFlagsHasLayout;
  2218.     property FontFlagsItalic: Boolean read FFontFlagsItalic write FFontFlagsItalic;
  2219.     property FontFlagsShiftJIS: Boolean read FFontFlagsShiftJIS write FFontFlagsShiftJIS;
  2220.     property FontFlagsSmallText: Boolean read FFontFlagsSmallText write FFontFlagsSmallText;
  2221.     property FontFlagsWideCodes: Boolean read FFontFlagsWideCodes write FFontFlagsWideCodes;
  2222.     property FontFlagsWideOffsets: Boolean read FFontFlagsWideOffsets write FFontFlagsWideOffsets;
  2223.     property FontKerningTable: TObjectList read GetFontKerningTable;
  2224.     property FontLeading: Word read FFontLeading write FFontLeading;
  2225.     property FontName: string read FFontName write FFontName;
  2226.     property KerningCount: Word read FKerningCount write FKerningCount;
  2227.     property LanguageCode: Byte read FLanguageCode write FLanguageCode;
  2228.     property SWFVersion: Byte read FSWFVersion write FSWFVersion;
  2229.   end;
  2230.   TSWFDefineFont3 = class (TSWFDefineFont2)
  2231.   public
  2232.     constructor Create; override;
  2233.     function MinVersion: Byte; override;
  2234.   end;
  2235.   TSWFZoneData = class (TObject)
  2236.   public
  2237.    property AlignmentCoordinate: word read FAlignmentCoordinate write
  2238.        FAlignmentCoordinate;
  2239.    property Range: word read FRange write FRange;
  2240.   end;
  2241.   TSWFZoneRecord = class (TObjectList)
  2242.   public
  2243.    procedure Assign(source: TSWFZoneRecord);
  2244.    function AddZoneData: TSWFZoneData;
  2245.    property NumZoneData: byte read FNumZoneData write FNumZoneData;
  2246.    property ZoneData[Index: Integer]: TSWFZoneData read GetZoneData;
  2247.    property ZoneMaskX: Boolean read FZoneMaskX write FZoneMaskX;
  2248.    property ZoneMaskY: Boolean read FZoneMaskY write FZoneMaskY;
  2249.   end;
  2250.   TSWFZoneTable = class (TObjectList)
  2251.   public
  2252.    function AddZoneRecord: TSWFZoneRecord;
  2253.    property ZoneRecord[Index: Integer]: TSWFZoneRecord read GetZoneRecord; default;
  2254.   end;
  2255.   TSWFDefineFontAlignZones = class (TSWFObject)
  2256.   public
  2257.     constructor Create;
  2258.     destructor Destroy; override;
  2259.     procedure Assign(Source: TBasedSWFObject); override;
  2260.     function MinVersion: Byte; override;
  2261.     procedure ReadFromStream(be: TBitsEngine); override;
  2262.     procedure WriteTagBody(be: TBitsEngine); override;
  2263. {$IFDEF XMLSupport}
  2264.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2265.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2266. {$ENDIF}
  2267.     property CSMTableHint: byte read FCSMTableHint write FCSMTableHint;
  2268.     property FontID: word read FFontID write FFontID;
  2269.     property ZoneTable: TSWFZoneTable read FZoneTable;
  2270.   end;
  2271.   TSWFDefineFontName = class (TSWFObject)
  2272.   public
  2273.     constructor Create;
  2274.     procedure Assign(Source: TBasedSWFObject); override;
  2275.     function MinVersion: Byte; override;
  2276.     procedure ReadFromStream(be: TBitsEngine); override;
  2277.     procedure WriteTagBody(be: TBitsEngine); override;
  2278. {$IFDEF XMLSupport}
  2279.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2280.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2281. {$ENDIF}
  2282.     property FontID: word read FFontID write FFontID;
  2283.     property FontName: string read FFontName write FFontName;
  2284.     property FontCopyright: string read FFontCopyright write FFontCopyright;
  2285.   end;
  2286.   TSWFGlyphEntry = class (TObject)
  2287.   public
  2288.     property GlyphAdvance: Integer read FGlyphAdvance write FGlyphAdvance;
  2289.     property GlyphIndex: Word read FGlyphIndex write FGlyphIndex;
  2290.   end;
  2291.   TSWFTextRecord = class (TObject)
  2292.   public
  2293.     constructor Create;
  2294.     destructor Destroy; override;
  2295.     procedure Assign(Source: TSWFTextRecord);
  2296.     procedure WriteToStream(be: TBitsEngine; gb, ab: byte);
  2297. {$IFDEF XMLSupport}
  2298.     procedure ReadFromXMLNode(Node: IXMLNode; var gb, ab: byte);
  2299.     procedure WriteToXMLNode(Node: IXMLNode);
  2300. {$ENDIF}
  2301.     property FontID: Word read FFontID write SetFontID;
  2302.     property GlyphEntries: TObjectList read FGlyphEntries;
  2303.     property GlyphEntry[Index: word]: TSWFGlyphEntry read GetGlyphEntry;
  2304.     property StyleFlagsHasColor: Boolean read FStyleFlagsHasColor write FStyleFlagsHasColor;
  2305.     property StyleFlagsHasFont: Boolean read FStyleFlagsHasFont write FStyleFlagsHasFont;
  2306.     property StyleFlagsHasXOffset: Boolean read FStyleFlagsHasXOffset write FStyleFlagsHasXOffset;
  2307.     property StyleFlagsHasYOffset: Boolean read FStyleFlagsHasYOffset write FStyleFlagsHasYOffset;
  2308.     property TextColor: TSWFRGBA read GetTextColor;
  2309.     property TextHeight: Word read FTextHeight write SetTextHeight;
  2310.     property XOffset: Integer read FXOffset write SetXOffset;
  2311.     property YOffset: Integer read FYOffset write SetYOffset;
  2312.   end;
  2313.   TSWFDefineText = class (TSWFObject)
  2314.   public
  2315.     constructor Create;
  2316.     destructor Destroy; override;
  2317.     procedure Assign(Source: TBasedSWFObject); override;
  2318.     procedure ReadFromStream(be: TBitsEngine); override;
  2319.     procedure WriteTagBody(be: TBitsEngine); override;
  2320. {$IFDEF XMLSupport}
  2321.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2322.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2323. {$ENDIF}
  2324.     property AdvanceBits: Byte read FAdvanceBits write FAdvanceBits;
  2325.     property CharacterID: Word read FCharacterID write FCharacterID;
  2326.     property GlyphBits: Byte read FGlyphBits write FGlyphBits;
  2327.     property hasAlpha: Boolean read FhasAlpha write FhasAlpha;
  2328.     property TextBounds: TSWFRect read FTextBounds;
  2329.     property TextMatrix: TSWFMatrix read FTextMatrix;
  2330.     property TextRecord[Index: Integer]: TSWFTextRecord read GetTextRecord;
  2331.     property TextRecords: TObjectList read FTextRecords;
  2332.   end;
  2333.   TSWFDefineText2 = class (TSWFDefineText)
  2334.   public
  2335.     constructor Create;
  2336.     function MinVersion: Byte; override;
  2337.   end;
  2338.   TSWFDefineEditText = class (TSWFObject)
  2339.   public
  2340.     constructor Create;
  2341.     destructor Destroy; override;
  2342.     procedure Assign(Source: TBasedSWFObject); override;
  2343.     function MinVersion: Byte; override;
  2344.     procedure ReadFromStream(be: TBitsEngine); override;
  2345.     procedure WriteTagBody(be: TBitsEngine); override;
  2346. {$IFDEF XMLSupport}
  2347.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2348.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2349. {$ENDIF}
  2350.     property Align: Byte read FAlign write FAlign;
  2351.     property AutoSize: Boolean read FAutoSize write FAutoSize;
  2352.     property Border: Boolean read FBorder write FBorder;
  2353.     property Bounds: TSWFRect read FBounds;
  2354.     property CharacterID: Word read FCharacterID write FCharacterID;
  2355.     property FontHeight: Word read FFontHeight write FFontHeight;
  2356.     property FontID: Word read FFontID write FFontID;
  2357.     property FontClass: string read FFontClass write FFontClass;
  2358.     property HasFont: Boolean read FHasFont write FHasFont;
  2359.     property HasFontClass: boolean read FHasFontClass write FHasFontClass;
  2360.     property HasLayout: Boolean read FHasLayout write FHasLayout;
  2361.     property HasMaxLength: Boolean read FHasMaxLength write FHasMaxLength;
  2362.     property HasText: Boolean read FHasText write FHasText;
  2363.     property HasTextColor: Boolean read FHasTextColor write FHasTextColor;
  2364.     property HTML: Boolean read FHTML write FHTML;
  2365.     property Indent: Word read FIndent write FIndent;
  2366.     property InitialText: AnsiString read FInitialText write FInitialText;
  2367.     property Leading: Word read FLeading write FLeading;
  2368.     property LeftMargin: Word read FLeftMargin write FLeftMargin;
  2369.     property MaxLength: Word read FMaxLength write FMaxLength;
  2370.     property Multiline: Boolean read FMultiline write FMultiline;
  2371.     property NoSelect: Boolean read FNoSelect write FNoSelect;
  2372.     property Password: Boolean read FPassword write FPassword;
  2373.     property ReadOnly: Boolean read FReadOnly write FReadOnly;
  2374.     property RightMargin: Word read FRightMargin write FRightMargin;
  2375.     property SWFVersion: Integer read FSWFVersion write FSWFVersion;
  2376.     property TextColor: TSWFRGBA read GetTextColor;
  2377.     property UseOutlines: Boolean read FUseOutlines write FUseOutlines;
  2378.     property VariableName: string read FVariableName write FVariableName;
  2379.     property WideInitialText: WideString read FWideInitialText write FWideInitialText;
  2380.     property WordWrap: Boolean read FWordWrap write FWordWrap;
  2381.   end;
  2382.   TSWFCSMTextSettings = class (TSWFObject)
  2383.   public
  2384.     constructor Create;
  2385.     destructor Destroy; override;
  2386.     procedure Assign(Source: TBasedSWFObject); override;
  2387.     function MinVersion: Byte; override;
  2388.     procedure ReadFromStream(be: TBitsEngine); override;
  2389.     procedure WriteTagBody(be: TBitsEngine); override;
  2390. {$IFDEF XMLSupport}
  2391.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2392.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2393. {$ENDIF}
  2394.     property GridFit: byte read FGridFit write FGridFit;
  2395.     property Sharpness: single read FSharpness write FSharpness;
  2396.     property TextID: word read FTextID write FTextID;
  2397.     property Thickness: single read FThickness write FThickness;
  2398.     property UseFlashType: byte read FUseFlashType write FUseFlashType;
  2399.   end;
  2400. // ===========================================================
  2401. //                         SOUND
  2402. // ===========================================================
  2403.   TSWFDefineSound = class (TSWFDataObject)
  2404.   public
  2405.     constructor Create; override;
  2406.     procedure Assign(Source: TBasedSWFObject); override;
  2407.     function MinVersion: Byte; override;
  2408.     procedure ReadFromStream(be: TBitsEngine); override;
  2409.     procedure WriteTagBody(be: TBitsEngine); override;
  2410. {$IFDEF XMLSupport}
  2411.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2412.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2413. {$ENDIF}
  2414.     property SeekSamples: Word read FSeekSamples write FSeekSamples;
  2415.     property SoundFormat: Byte read FSoundFormat write FSoundFormat;
  2416.     property SoundId: Word read FSoundId write FSoundId;
  2417.     property SoundRate: Byte read FSoundRate write FSoundRate;
  2418.     property SoundSampleCount: dword read FSoundSampleCount write FSoundSampleCount;
  2419.     property SoundSize: Boolean read FSoundSize write FSoundSize;
  2420.     property SoundType: Boolean read FSoundType write FSoundType;
  2421.   end;
  2422.   TSWFSoundEnvelope = class (TObject)
  2423.   public
  2424.     procedure Assign(Source: TSWFSoundEnvelope);
  2425.     property LeftLevel: Word read FLeftLevel write FLeftLevel;
  2426.     property Pos44: dword read FPos44 write FPos44;
  2427.     property RightLevel: Word read FRightLevel write FRightLevel;
  2428.   end;
  2429.   TSWFStartSound = class (TSWFObject)
  2430.   public
  2431.     constructor Create;
  2432.     destructor Destroy; override;
  2433.     procedure AddEnvelope(pos: dword; left, right: word);
  2434.     procedure Assign(Source: TBasedSWFObject); override;
  2435.     procedure ReadFromStream(be: TBitsEngine); override;
  2436.     procedure WriteTagBody(be: TBitsEngine); override;
  2437. {$IFDEF XMLSupport}
  2438.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2439.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2440. {$ENDIF}
  2441.     property HasEnvelope: Boolean read FHasEnvelope write FHasEnvelope;
  2442.     property HasInPoint: Boolean read FHasInPoint write FHasInPoint;
  2443.     property HasLoops: Boolean read FHasLoops write FHasLoops;
  2444.     property HasOutPoint: Boolean read FHasOutPoint write FHasOutPoint;
  2445.     property InPoint: dword read FInPoint write SetInPoint;
  2446.     property LoopCount: Word read FLoopCount write SetLoopCount;
  2447.     property OutPoint: dword read FOutPoint write SetOutPoint;
  2448.     property SoundEnvelopes: TObjectList read FSoundEnvelopes;
  2449.     property SoundId: Word read FSoundId write FSoundId;
  2450.     property SyncNoMultiple: Boolean read FSyncNoMultiple write FSyncNoMultiple;
  2451.     property SyncStop: Boolean read FSyncStop write FSyncStop;
  2452.   end;
  2453.   TSWFStartSound2 = class(TSWFStartSound)
  2454.   public
  2455.     constructor Create;
  2456.     function MinVersion: Byte; override;
  2457.     property SoundClassName;
  2458.   end;
  2459.   TSWFSoundStreamHead = class (TSWFObject)
  2460.   public
  2461.     constructor Create; virtual;
  2462.     procedure Assign(Source: TBasedSWFObject); override;
  2463.     function MinVersion: Byte; override;
  2464.     procedure ReadFromStream(be: TBitsEngine); override;
  2465.     procedure WriteTagBody(be: TBitsEngine); override;
  2466. {$IFDEF XMLSupport}
  2467.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2468.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2469. {$ENDIF}
  2470.     property LatencySeek: Integer read FLatencySeek write FLatencySeek;
  2471.     property PlaybackSoundRate: Byte read FPlaybackSoundRate write FPlaybackSoundRate;
  2472.     property PlaybackSoundSize: Boolean read FPlaybackSoundSize write FPlaybackSoundSize;
  2473.     property PlaybackSoundType: Boolean read FPlaybackSoundType write FPlaybackSoundType;
  2474.     property StreamSoundCompression: Byte read FStreamSoundCompression write FStreamSoundCompression;
  2475.     property StreamSoundRate: Byte read FStreamSoundRate write FStreamSoundRate;
  2476.     property StreamSoundSampleCount: Word read FStreamSoundSampleCount write FStreamSoundSampleCount;
  2477.     property StreamSoundSize: Boolean read FStreamSoundSize write FStreamSoundSize;
  2478.     property StreamSoundType: Boolean read FStreamSoundType write FStreamSoundType;
  2479.   end;
  2480.   TSWFSoundStreamHead2 = class (TSWFSoundStreamHead)
  2481.   public
  2482.     constructor Create; override;
  2483.     function MinVersion: Byte; override;
  2484.   end;
  2485.   TSWFSoundStreamBlock = class (TSWFDataObject)
  2486.   public
  2487.     constructor Create; override;
  2488.     procedure Assign(Source: TBasedSWFObject); override;
  2489.     procedure ReadFromStream(be: TBitsEngine); override;
  2490.     procedure WriteTagBody(be: TBitsEngine); override;
  2491. {$IFDEF XMLSupport}
  2492.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2493.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2494. {$ENDIF}
  2495.     property SampleCount: Word read FSampleCount write FSampleCount;
  2496.     property SeekSamples: SmallInt read FSeekSamples write FSeekSamples;
  2497.     property StreamSoundCompression: Byte read FStreamSoundCompression write FStreamSoundCompression;
  2498.   end;
  2499. // ==========================================================//
  2500. //                       Buttons                             //
  2501. // ==========================================================//
  2502.   TSWFButtonRecord = class (TObject)
  2503.   public
  2504.     constructor Create(ChID: word);
  2505.     destructor Destroy; override;
  2506.     procedure Assign(Source: TSWFButtonRecord);
  2507.     procedure WriteToStream(be: TBitsEngine);
  2508. {$IFDEF XMLSupport}
  2509.     procedure ReadFromXMLNode(Node: IXMLNode);
  2510.     procedure WriteToXMLNode(Node: IXMLNode);
  2511. {$ENDIF}
  2512.     property BlendMode: TSWFBlendMode read FBlendMode write FBlendMode;
  2513.     property ButtonHasBlendMode: Boolean read FButtonHasBlendMode write
  2514.         FButtonHasBlendMode;
  2515.     property ButtonHasFilterList: Boolean read FButtonHasFilterList write
  2516.         FButtonHasFilterList;
  2517.     property ButtonState: TSWFButtonStates read FButtonState write FButtonState;
  2518.     property CharacterID: Word read FCharacterID write FCharacterID;
  2519.     property ColorTransform: TSWFColorTransform read GetColorTransform;
  2520.     property Depth: Word read FDepth write FDepth;
  2521.     property hasColorTransform: Boolean read FhasColorTransform write FhasColorTransform;
  2522.     property Matrix: TSWFMatrix read GetMatrix;
  2523.     property FilterList: TSWFFilterList read GetFilterList;
  2524.   end;
  2525.   TSWFBasedButton = class (TSWFObject)
  2526.   public
  2527.     constructor Create; virtual;
  2528.     destructor Destroy; override;
  2529.     procedure Assign(Source: TBasedSWFObject); override;
  2530.     function MinVersion: Byte; override;
  2531.     property Actions: TSWFActionList read FActions;
  2532.     property ButtonId: Word read FButtonId write FButtonId;
  2533.     property ButtonRecord[index: integer]: TSWFButtonRecord read GetButtonRecord;
  2534.     property ButtonRecords: TObjectList read FButtonRecords;
  2535.     property ParseActions: Boolean read FParseActions write FParseActions;
  2536. {$IFDEF XMLSupport}
  2537.     property OnXMLReadAction: TSWFObjectXMLRWEvent read FOnXMLReadAction write FOnXMLReadAction;
  2538. {$ENDIF}
  2539.   end;
  2540.   TSWFDefineButton = class (TSWFBasedButton)
  2541.   public
  2542.     procedure Assign(Source: TBasedSWFObject); override;
  2543.     function MinVersion: Byte; override;
  2544.     procedure ReadFromStream(be: TBitsEngine); override;
  2545.     procedure WriteTagBody(be: TBitsEngine); override;
  2546. {$IFDEF XMLSupport}
  2547.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2548.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2549. {$ENDIF}
  2550.     property Action[Index: Integer]: TSWFAction read GetAction;
  2551.   end;
  2552.   TSWFButtonCondAction = class (TSWFActionList)
  2553.   public
  2554.     procedure Assign(Source: TSWFButtonCondAction);
  2555.     function Actions: TSWFActionList;
  2556.     procedure WriteToStream(be: TBitsEngine; isEnd:boolean);
  2557.     property ActionConditions: TSWFStateTransitions read FActionConditions write FActionConditions;
  2558.     property ID_Key: Byte read FID_Key write FID_Key;
  2559.   end;
  2560.   TSWFDefineButton2 = class (TSWFBasedButton)
  2561.   public
  2562.     constructor Create; override;
  2563.     procedure Assign(Source: TBasedSWFObject); override;
  2564.     function MinVersion: Byte; override;
  2565.     procedure ReadFromStream(be: TBitsEngine); override;
  2566.     procedure WriteTagBody(be: TBitsEngine); override;
  2567. {$IFDEF XMLSupport}
  2568.     procedure ReadEventActionsFromXML(Node: IXMLNode; Settings: TXMLReadWriteSettings);
  2569.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2570.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2571. {$ENDIF}
  2572.     property CondAction[Index: Integer]: TSWFButtonCondAction read GetCondAction;
  2573.     property TrackAsMenu: Boolean read FTrackAsMenu write FTrackAsMenu;
  2574.   end;
  2575.   TSWFDefineButtonSound = class (TSWFObject)
  2576.   public
  2577.     constructor Create;
  2578.     destructor Destroy; override;
  2579.     procedure Assign(Source: TBasedSWFObject); override;
  2580.     function MinVersion: Byte; override;
  2581.     procedure ReadFromStream(be: TBitsEngine); override;
  2582.     procedure WriteTagBody(be: TBitsEngine); override;
  2583. {$IFDEF XMLSupport}
  2584.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2585.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2586. {$ENDIF}
  2587.     property ButtonId: Word read FButtonId write FButtonId;
  2588.     property HasIdleToOverUp: Boolean read FHasIdleToOverUp write FHasIdleToOverUp;
  2589.     property HasOverDownToOverUp: Boolean read FHasOverDownToOverUp write FHasOverDownToOverUp;
  2590.     property HasOverUpToIdle: Boolean read FHasOverUpToIdle write FHasOverUpToIdle;
  2591.     property HasOverUpToOverDown: Boolean read FHasOverUpToOverDown write FHasOverUpToOverDown;
  2592.     property SndIdleToOverUp: TSWFStartSound read GetSndIdleToOverUp;
  2593.     property SndOverDownToOverUp: TSWFStartSound read GetSndOverDownToOverUp;
  2594.     property SndOverUpToIdle: TSWFStartSound read GetSndOverUpToIdle;
  2595.     property SndOverUpToOverDown: TSWFStartSound read GetSndOverUpToOverDown;
  2596.   end;
  2597.   TSWFDefineButtonCxform = class (TSWFObject)
  2598.   public
  2599.     constructor Create;
  2600.     destructor Destroy; override;
  2601.     procedure Assign(Source: TBasedSWFObject); override;
  2602.     function MinVersion: Byte; override;
  2603.     procedure ReadFromStream(be: TBitsEngine); override;
  2604.     procedure WriteTagBody(be: TBitsEngine); override;
  2605. {$IFDEF XMLSupport}
  2606.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2607.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2608. {$ENDIF}
  2609.     property ButtonColorTransform: TSWFColorTransform read FButtonColorTransform;
  2610.     property ButtonId: Word read FButtonId write FButtonId;
  2611.   end;
  2612. // ==========================================================//
  2613. //                       SPRITE                             //
  2614. // ==========================================================//
  2615.   TSWFDefineSprite = class (TSWFObject)
  2616.   public
  2617.     constructor Create;
  2618.     destructor Destroy; override;
  2619.     procedure Assign(Source: TBasedSWFObject); override;
  2620.     function MinVersion: Byte; override;
  2621.     procedure ReadFromStream(be: TBitsEngine); override;
  2622.     procedure WriteTagBody(be: TBitsEngine); override;
  2623. {$IFDEF XMLSupport}
  2624.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2625.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2626. {$ENDIF}
  2627.     property ControlTag[Index: word]: TSWFObject read GetControlTag;
  2628.     property ControlTags: TObjectList read FControlTags;
  2629.     property FrameCount: Word read FFrameCount write FFrameCount;
  2630.     property ParseActions: Boolean read FParseActions write FParseActions;
  2631.     property SpriteID: Word read FSpriteID write FSpriteID;
  2632.     property SWFVersion: Byte read FSWFVersion write FSWFVersion;
  2633.   end;
  2634.   TSWFDefineSceneAndFrameLabelData = class (TSWFObject)
  2635.   public
  2636.     constructor Create;
  2637.     destructor Destroy; override;
  2638.     procedure Assign(Source: TBasedSWFObject); override;
  2639.     function MinVersion: Byte; override;
  2640.     procedure ReadFromStream(be: TBitsEngine); override;
  2641.     procedure WriteTagBody(be: TBitsEngine); override;
  2642. {$IFDEF XMLSupport}
  2643.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2644.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2645. {$ENDIF}
  2646.     property FrameLabels: TStringList read FFrameLabels;
  2647.     property Scenes: TStringList read FScenes;
  2648.   end;
  2649. // ==========================================================//
  2650. //                       Video                               //
  2651. // ==========================================================//
  2652.   TSWFDefineVideoStream = class (TSWFObject)
  2653.   public
  2654.     constructor Create;
  2655.     procedure Assign(Source: TBasedSWFObject); override;
  2656.     function MinVersion: Byte; override;
  2657.     procedure ReadFromStream(be: TBitsEngine); override;
  2658.     procedure WriteTagBody(be: TBitsEngine); override;
  2659. {$IFDEF XMLSupport}
  2660.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2661.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2662. {$ENDIF}
  2663.     property CharacterID: Word read FCharacterID write FCharacterID;
  2664.     property CodecID: Byte read FCodecID write FCodecID;
  2665.     property Height: Word read FHeight write FHeight;
  2666.     property NumFrames: Word read FNumFrames write FNumFrames;
  2667.     property VideoFlagsDeblocking: Byte read FVideoFlagsDeblocking write FVideoFlagsDeblocking;
  2668.     property VideoFlagsSmoothing: Boolean read FVideoFlagsSmoothing write FVideoFlagsSmoothing;
  2669.     property Width: Word read FWidth write FWidth;
  2670.   end;
  2671.   TSWFVideoFrame = class (TSWFDataObject)
  2672.   public
  2673.     constructor Create; override;
  2674.     procedure Assign(Source: TBasedSWFObject); override;
  2675.     function MinVersion: Byte; override;
  2676.     procedure ReadFromStream(be: TBitsEngine); override;
  2677.     procedure WriteTagBody(be: TBitsEngine); override;
  2678. {$IFDEF XMLSupport}
  2679.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2680.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2681. {$ENDIF}
  2682.     property FrameNum: Word read FFrameNum write FFrameNum;
  2683.     property StreamID: Word read FStreamID write FStreamID;
  2684.   end;
  2685. // ================== undocumented tags ====================================
  2686.   TSWFByteCodeTag = class (TSWFDataObject)
  2687.   public
  2688.     constructor Create;  override;
  2689.     procedure ReadFromStream(be: TBitsEngine); override;
  2690.     procedure WriteTagBody(be: TBitsEngine); override;
  2691.     procedure WriteToStream(be: TBitsEngine); override;
  2692. {$IFDEF XMLSupport}
  2693.     procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2694.     procedure WriteToXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
  2695. {$ENDIF}
  2696.     property ByteCode[Index: word]: Byte read GetByteCode;
  2697.     property TagIDFrom: Word read FTagIDFrom write FTagIDFrom;
  2698.     property Text: string read FText write FText;
  2699.   end;
  2700. // ==================== tools  ==============================
  2701. Function GenerateSWFObject(ID: word): TSWFObject;
  2702. Function GenerateSWFAction(ID: word): TSWFAction;
  2703. procedure CopyActionList(Source, Dest: TSWFActionList);
  2704. Procedure WriteCustomData(Dest: TStream; TagID: byte; data: pointer; Size: longint); overload;
  2705. Procedure WriteCustomData(Dest: TStream; TagID: byte; data: TStream; Size: longint = 0); overload;
  2706. procedure CopyShapeRecords(Source, Dest: TObjectList);
  2707. {$IFDEF XMLSupport}
  2708. procedure ReadLineStylesFromXML(Root:IXMLNode; LS: TObjectList; Alpha: boolean);
  2709. procedure ReadFillStylesFromXML(Root: IXMLNode; FS: TObjectList; Alpha: boolean);
  2710. procedure ReadActionListFromXML(Node: IXMLNode; AL: TSWFActionList; Settings: TXMLReadWriteSettings);
  2711. Procedure ReadMorphFillStylesFromXML(Root:IXMLNode; FS: TObjectList);
  2712. Procedure ReadMorphLineStylesFromXML(Root:IXMLNode; LS: TObjectList);
  2713. {$ENDIF}
  2714.  const
  2715.     noSupport = false;
  2716. implementation