flashobjects.int
上传用户:raido2005
上传日期:2022-06-22
资源大小:5044k
文件大小:54k
- //*******************************************************//
- // //
- // DelphiFlash.com //
- // Copyright (c) 2004-2008 FeatherySoft, Inc. //
- // info@delphiflash.com //
- // //
- //*******************************************************//
- // Description: Level of Flash-objects
- // Last update: 9 jun 2008
- {$I defines.inc}
- //{$Q-}
- unit FlashObjects;
- interface
- uses Windows, Classes, Contnrs, Graphics, SysUtils,
- {$IFDEF VARIANTS}
- Variants,
- {$ENDIF}
- {$IFDEF DelphiJPEG}
- JPEG,
- {$ENDIF}
- SWFConst, SWFObjects, SWFStreams, SWFTools,
- {$IFDEF XMLSupport}
- SWFStrings, XMLDoc, XMLIntf, SWFXMLTools, FlashXMLTools,
- {$ENDIF}
- SoundReader, ImageReader, FLV;
- type
- TFlashMovie = class;
- TFlashObject = class (TBasedSWFObject)
- public
- constructor Create(owner: TFlashMovie);
- function LibraryLevel: Byte; override;
- property Owner: TFlashMovie read FOwner write SetOwner;
- end;
- TFlashIDObject = class (TFlashObject)
- public
- procedure Assign(Source: TBasedSWFObject); override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- property CharacterId: Word read GetCharacterId write SetCharacterId;
- end;
- TFlashSound = class (TFlashIDObject)
- public
- constructor Create(owner: TFlashMovie; fn: string = '');
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- procedure FillHeader(SH: TSWFSoundStreamHead; fps: single);
- procedure LoadSound(fn: string);
- procedure LoadFromMemory(Src: TMemoryStream; isMP3: boolean);
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- function StartSound: TSWFStartSound;
- procedure WriteSoundBlock(BE: TBitsEngine);
- procedure WriteSoundData(sender: TSWFObject; BE: TBitsEngine);
- procedure WriteToStream(be: TBitsEngine); override;
- property AutoLoop: Boolean read FAutoLoop write FAutoLoop;
- property Duration: Double read FDuration write FDuration;
- property MP3Info: TMP3Info read FMP3Info write FMP3Info;
- property recomendSampleCount: Word read FrecomendSampleCount write FrecomendSampleCount;
- property SampleCount: dword read FSampleCount write FSampleCount;
- property SamplesPerSec: Word read FSamplesPerSec;
- property sndFormat: Byte read FsndFormat write FsndFormat;
- property sndRate: Byte read FsndRate write FsndRate;
- property StartFrame: Word read FStartFrame write FStartFrame;
- property Stereo: Boolean read FStereo write FStereo;
- property _16Bit: Boolean read F_16Bit write F_16Bit;
- property WaveCompressBits: byte read FWaveCompressBits write SetWaveCompressBits;
- end;
- // =================== TFlashImage ========================
- TFlashImage = class;
- TLoadCustomImageProc = procedure (sender: TFlashImage; FileName: string);
- TLoadCustomImageEvent = procedure (sender: TFlashImage; FileName: string; var Default: boolean) of object;
- TImageDataState = (dsNoInit, dsMemory, dsMemoryBMP, dsInitJPEG, dsMemoryJPEG, dsFileJPEG);
- TFlashImage = class (TFlashIDObject)
- public
- constructor Create(owner: TFlashMovie; fn: string = '');
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- procedure CopyToStream(S: TStream);
- procedure LoadAlphaDataFromFile(fn: string);
- procedure LoadAlphaDataFromHandle(HBMP: HBitmap);
- procedure LoadAlphaDataFromStream(S: TStream);
- procedure LoadDataFromFile(fn: string);
- procedure LoadDataFromHandle(HBMP: HBitmap);
- procedure LoadDataFromNativeStream(S: TStream; JPG: boolean; Width, Height: integer); overload;
- procedure LoadDataFromNativeStream(S: TStream; JPG: boolean; Width, Height: integer; BMPType, ColorCount: byte; HasAlpha: boolean); overload;
- procedure LoadDataFromStream(S: TStream);
- procedure MakeAlphaLayer(Alpha: byte = $FF);
- procedure MakeDataFromBMP;
- procedure FillBitsLossless(BL: TSWFDefineBitsLossless);
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure SetAlphaColor(Color: recRGBA);
- procedure SetAlphaIndex(Index, Alpha: byte);
- procedure WriteAlphaData(sender: TSWFObject; BE: TBitsEngine);
- procedure WriteData(sender: TSWFObject; BE: TBitsEngine);
- procedure WriteToStream(be: TBitsEngine); override;
- property AlphaData: TMemoryStream read GetAlphaData;
- property AlphaPixel[X, Y: Integer]: Byte read GetAlphaPixel write SetAlphaPixel;
- property AsJPEG: Boolean read FAsJPEG write SetAsJPEG;
- property BMPStorage: TBMPReader read GetBMPStorage;
- property ColorCount: Integer read FColorCount;
- property ConvertProgressiveJPEG: Boolean read FConvertProgressiveJPEG write SetConvertProgressiveJPEG;
- property Data: TStream read GetData write SetData;
- property DataState: TImageDataState read FDataState;
- property FileName: string read FFileName write SetFileName;
- property HasUseAlpha: Boolean read FHasUseAlpha write FHasUseAlpha;
- property Height: Word read GetHeight;
- property SaveWidth: Word read FSaveWidth;
- property Width: Word read GetWidth;
- end;
- // =================== TFlashActionScript ========================
- TFlashActionScript = class (TFlashObject)
- public
- constructor Create(owner: TFlashMovie; A: TSWFActionList = nil);
- destructor Destroy; override;
- procedure Add;
- procedure Add2;
- procedure AsciiToChar;
- procedure Assign(Source: TBasedSWFObject); override;
- procedure BitAnd;
- procedure BitLShift;
- procedure BitOr;
- procedure BitRShift;
- procedure BitURShift;
- procedure BitXor;
- function ByteCode(const str: string): TSWFActionByteCode; overload;
- function ByteCode(const AB: array of byte): TSWFActionByteCode; overload;
- function ByteCode(Data: Pointer; Size: longint): TSWFActionByteCode; overload;
- procedure Call;
- procedure CallFunction;
- procedure CallMethod;
- procedure CastOp;
- procedure CharToAscii;
- procedure CloneSprite;
- {$IFDEF ASCompiler}
- function Compile(src: TStrings): boolean; overload;
- function Compile(src: TStream): boolean; overload;
- function Compile(src: ansistring): boolean; overload;
- function Compile(FileName: string; unicode: boolean): boolean; overload;
- {$ENDIF}
- function ConstantPool(Consts: array of string): TSWFActionConstantPool; overload;
- function ConstantPool(Consts: TStrings): TSWFActionConstantPool; overload;
- procedure Decrement;
- function DefineFunction(Name: string; Params: array of string): TSWFActionDefineFunction; overload;
- function DefineFunction(Name: string; Params: TStrings): TSWFActionDefineFunction; overload;
- function DefineFunction2(Name: string; Params: array of string; RegistersAllocate: byte): TSWFActionDefineFunction2; overload;
- function DefineFunction2(Name: string; Params: TStrings; RegistersAllocate: byte): TSWFActionDefineFunction2; overload;
- procedure DefineLocal;
- procedure DefineLocal2;
- procedure Delete;
- procedure Delete2;
- procedure Divide;
- procedure EndDrag;
- procedure Enumerate;
- procedure Enumerate2;
- procedure Equals;
- procedure Equals2;
- procedure Extends;
- procedure FSCommand(command, param: string);
- procedure FSCommand2(Args: TStrings); overload; // for Flash Lite
- procedure FSCommand2(Args: string); overload;
- procedure FSCommand2(const Args: array of Variant); overload;
- procedure GetMember;
- procedure GetProperty; overload;
- procedure GetProperty(targ: string; id: byte); overload;
- procedure GetTime;
- procedure GetUrl(const Url, Target: string);
- procedure GetUrl2(TargetFlag, VariablesFlag: boolean; SendMethod: byte);
- procedure GetVariable; overload;
- procedure GetVariable(VarName: string); overload;
- procedure GotoAndPlay(_Label: string); overload;
- procedure GotoAndPlay(Frame: Word); overload;
- procedure GotoAndStop(_Label: string); overload;
- procedure GotoAndStop(Frame: Word); overload;
- procedure GotoFrame(N: word);
- procedure GotoFrame2(Play: boolean; SceneBias: word = 0);
- procedure GoToLabel(FrameLabel: string);
- procedure Greater;
- procedure ImplementsOp;
- procedure Increment;
- procedure InitArray;
- procedure InitObject;
- procedure InstanceOf;
- function Jump: TSWFActionJump;
- procedure Less;
- procedure Less2;
- function LoadMovie(URL, Target: string; IsBrowserTarget: boolean = false; Method: byte = svmNone): TSWFActionGetUrl2;
- function LoadMovieNum(URL: string; Level: word; Method: byte = svmNone): TSWFActionGetUrl2;
- function LoadVariables(URL, Target: string; Method: byte = svmNone): TSWFActionGetUrl2;
- function LoadVariablesNum(URL: string; Level: word; Method: byte = svmNone): TSWFActionGetUrl2;
- procedure MBAsciiToChar;
- procedure MBCharToAscii;
- procedure MBStringExtract;
- procedure MBStringLength;
- function MinVersion: Byte; override;
- procedure Modulo;
- procedure Multiply;
- procedure NewMethod;
- procedure NewObject;
- procedure NextFrame;
- procedure Operation(op: string);
- procedure Play;
- procedure Pop;
- procedure PreviousFrame;
- function Push(const Args: array of Variant): TSWFActionPush; overload;
- function Push(const Args: array of Variant; const Types: array of TSWFValueType): TSWFActionPush; overload;
- function Push(Value: Variant): TSWFActionPush; overload;
- procedure PushConstant(Value: word); overload;
- procedure PushConstant(const Args: array of word); overload;
- procedure PushDuplicate;
- procedure PushRegister(const Args: array of Word); overload;
- procedure PushRegister(Value: Word); overload;
- procedure Random; overload;
- procedure Random(max: dword); overload;
- procedure Random(min, max: dword); overload;
- procedure RandomNumber;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure RemoveSprite;
- procedure Return;
- procedure SetArray(const name: string; const Args: array of Variant; inSprite: boolean = false);
- function SetMarker(M: TSWFOffsetMarker = nil; ToBack: boolean = false): TSWFOffsetMarker;
- procedure SetMember;
- procedure SetProperty; overload;
- procedure SetProperty(targ: string; id: byte); overload;
- procedure SetTarget(TargetName: string);
- procedure SetTarget2;
- procedure SetVar(VarName: string; Value: Variant; inSprite: boolean = false);
- procedure SetVariable;
- procedure StackSwap;
- procedure StartDrag;
- procedure Stop;
- procedure StopSounds;
- procedure StoreRegister(Num: byte);
- procedure StrictEquals;
- procedure StringAdd;
- procedure StringEquals;
- procedure StringExtract;
- procedure StringGreater;
- procedure StringLength;
- procedure StringLess;
- procedure Subtract;
- procedure TargetPath;
- procedure Throw;
- procedure ToggleQuality;
- procedure ToInteger;
- procedure ToNumber;
- procedure ToString;
- procedure Trace;
- procedure TypeOf;
- procedure WaitForFrame(Frame: Word; SkipCount: Byte);
- procedure WaitForFrame2;
- procedure WriteToStream(be: TBitsEngine); override;
- procedure _And;
- function _If: TSWFActionIf;
- procedure _Not;
- procedure _Or;
- function _Try: TSWFActionTry;
- function _With: TSWFActionWith;
- property Action[index: integer]: TSWFAction read GetAction;
- property ActionList: TSWFActionList read FActionList;
- property SelfDestroy: Boolean read FSelfDestroy write FSelfDestroy;
- end;
- TFlashVisualObject = class (TFlashIDObject)
- public
- procedure Assign(Source: TBasedSWFObject); override;
- property IgnoreMovieSettings: Boolean read FIgnoreMovieSettings write FIgnoreMovieSettings;
- property MultCoord: Byte read GetMultCoord;
- end;
- // ================= Shapes ==================================
- TFlashEdges = class (TObject)
- public
- constructor Create(List: TObjectList);
- destructor Destroy; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode);
- {$ENDIF}
- function AddChangeStyle: TSWFStyleChangeRecord;
- procedure CloseAllConturs;
- procedure CloseShape;
- procedure CopyFrom(Source: TFlashEdges);
- function CurveDelta(ControlX, ControlY, AnchorX, AnchorY: longint): TSWFCurvedEdgeRecord;
- function CurveTo(ControlX, ControlY, AnchorX, AnchorY: longint): TSWFCurvedEdgeRecord;
- function EndEdges: TSWFEndShapeRecord;
- function GetBoundsRect: TRect;
- function isClockWise: boolean;
- function LineDelta(DX, DY: longint): TSWFStraightEdgeRecord;
- function LineTo(X, Y: longint): TSWFStraightEdgeRecord; overload;
- function LineTo(P: TPoint): TSWFStraightEdgeRecord; overload;
- procedure MakeArc(XC, YC: longInt; RadiusX, RadiusY: longint; StartAngle, EndAngle: single; closed: boolean = true; clockwise: boolean = true); overload;
- procedure MakeArc(XC, YC: longInt; Radius: longint; StartAngle, EndAngle: single; closed: boolean = true); overload;
- procedure MakeCubicBezier(P1, P2, P3: TPoint; parts: byte = 4);
- procedure MakeDiamond(W, H: longint);
- procedure MakeEllipse(W, H: longint);
- procedure MakeMirror(Horz, Vert: boolean);
- procedure MakePie(Radius: longint; StartAngle, EndAngle: single); overload;
- procedure MakePie(RadiusX, RadiusY: longint; StartAngle, EndAngle: single; clockwise: boolean = true); overload;
- procedure MakePolyBezier(AP: array of TPoint; Start: TPoint);
- procedure MakePolyline(AP: array of TPoint);
- procedure MakeRectangle(W, H: longint);
- procedure MakeRoundRect(W, H, R: longint); overload;
- procedure MakeRoundRect(W, H, RX, RY: longint); overload;
- procedure MakeStar(X, Y, R1, R2: longint; NumPoint: word; curve: boolean = false);
- function MoveDelta(X, Y: longint): TSWFStyleChangeRecord;
- function MoveTo(X, Y: longint): TSWFStyleChangeRecord;
- procedure OffsetEdges(DX, DY: LongInt; UseSysCoord: boolean = true);
- function StartNewStyle: TSWFStyleChangeRecord; overload;
- function StartNewStyle(MoveToX, MoveToY: longint): TSWFStyleChangeRecord; overload;
- property CurrentPos: TPoint read FCurrentPos;
- property IgnoreMovieSettings: Boolean read FIgnoreMovieSettings write FIgnoreMovieSettings;
- property LastStart: TPoint read FLastStart;
- property MultCoord: Byte read GetMultCoord;
- property OptimizeMode: boolean read FOptimizeMode write FOptimizeMode;
- end;
- TFlashLineStyle = class (TObject)
- public
- constructor Create;
- destructor Destroy; override;
- procedure SetStyle(A: array of byte);
- property Count: Byte read GetCount write SetCount;
- property Len[Index: Integer]: Byte read GetLen write SetLen; default;
- end;
- TFlashShape = class (TFlashVisualObject)
- public
- constructor Create(owner: TFlashMovie);
- destructor Destroy; override;
- function AddFillStyle(fill: TSWFFillStyle): TSWFFillStyle;
- function AddLineStyle(outline: TSWFLineStyle = nil): TSWFLineStyle;
- function AddChangeStyle: TSWFStyleChangeRecord;
- procedure Assign(Source: TBasedSWFObject); override;
- procedure CalcBounds;
- procedure MakeMirror(Horz, Vert: boolean);
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- function SetImageFill(img: TFlashImage; mode: TFillImageMode; ScaleX: single = 1; ScaleY: single = 1):
- TSWFImageFill;
- function SetLinearGradient(Gradient: array of recRGBA; angle: single = 0): TSWFGradientFill; overload;
- function SetLinearGradient(Gradient: array of TSWFGradientRec; angle: single = 0): TSWFGradientFill; overload;
- function SetLinearGradient(C1, C2: recRGBA; angle: single = 0): TSWFGradientFill; overload;
- function SetLineStyle(width: word; c: recRGB): TSWFLineStyle; overload;
- function SetLineStyle(width: word; c: recRGBA): TSWFLineStyle; overload;
- function SetAdvancedLineStyle(width: word; c: recRGBA; CapStyle: byte = 0; JoinStyle: byte = 0): TSWFLineStyle2;
- function SetRadialGradient(Gradient: array of recRGBA; Xc, Yc: byte): TSWFGradientFill; overload;
- function SetRadialGradient(C1, C2: recRGBA; Xc, Yc: byte): TSWFGradientFill; overload;
- function SetFocalGradient(Gradient: array of recRGBA; FocalPoint: single;
- InterpolationMode: TSWFInterpolationMode; SpreadMode: TSWFSpreadMode): TSWFFocalGradientFill; overload;
- function SetFocalGradient(Color1, Color2: recRGBA; FocalPoint: single;
- InterpolationMode: TSWFInterpolationMode; SpreadMode: TSWFSpreadMode): TSWFGradientFill; overload;
- procedure SetShapeBound(XMin, YMin, XMax, YMax: integer);
- function SetSolidColor(r, g, b, a: byte): TSWFColorFill; overload;
- function SetSolidColor(c: recRGB): TSWFColorFill; overload;
- function SetSolidColor(c: recRGBA): TSWFColorFill; overload;
- procedure WriteToStream(be: TBitsEngine); override;
- property Bounds: TSWFRect read FBounds;
- property Edges: TFlashEdges read FEdges;
- property ExtLineStyle: TFlashLineStyle read GetExtLineStyle;
- property ExtLineTransparent: boolean read FExtLineTransparent write FExtLineTransparent;
- property FillStyleLeft: Word read FFillStyleLeft write SetFillStyleLeft;
- property FillStyleNum: Word read FFillStyleRight write SetFillStyleRight;
- property FillStyleRight: Word read FFillStyleRight write SetFillStyleRight;
- property HasExtLineStyle: Boolean read FHasExtLineStyle write FHasExtLineStyle;
- property LineStyleNum: Word read FLineStyleNum write SetLineStyleNum;
- property LineBgColor: TSWFRGBA read GetLineBgColor;
- property StyleChangeMode: TStyleChangeMode read FStyleChangeMode write FStyleChangeMode;
- property XCenter: LongInt read GetCenterX write SetCenterX;
- property XMax: Integer read GetXMax write SetXMax;
- property XMin: Integer read GetXMin write SetXMin;
- property YCenter: LongInt read GetCenterY write SetCenterY;
- property YMax: Integer read GetYMax write SetYMax;
- property YMin: Integer read GetYMin write SetYMin;
- end;
- TFlashMorphShape = class (TFlashVisualObject)
- public
- constructor Create(owner: TFlashMovie);
- destructor Destroy; override;
- procedure AddFillStyle(fill: TSWFMorphFillStyle);
- function AddLineStyle(outline: TSWFMorphLineStyle = nil): TSWFMorphLineStyle;
- procedure Assign(Source: TBasedSWFObject); override;
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure SetEndBound(XMin, YMin, XMax, YMax: integer);
- function SetImageFill(img: TFlashImage; mode: TFillImageMode; StartScaleX: single = 1; StartScaleY: single = 1;
- EndScaleX: single = 1; EndScaleY: single = 1): TSWFMorphImageFill;
- function SetLinearGradient(StartGradient, EndGradient: array of recRGBA; StartAngle: single = 0; EndAngle: single = 0):
- TSWFMorphGradientFill; overload;
- function SetLinearGradient(Gradient: array of TSWFMorphGradientRec; StartAngle: single = 0; EndAngle: single = 0):
- TSWFMorphGradientFill; overload;
- function SetLinearGradient(StartC1, StartC2, EndC1, EndC2: recRGBA; StartAngle: single = 0; EndAngle: single = 0):
- TSWFMorphGradientFill; overload;
- function SetLineStyle(StartWidth, EndWidth: word; StartColor, EndColor: recRGBA): TSWFMorphLineStyle;
- function SetAdvancedLineStyle(StartWidth, EndWidth: word; StartColor, EndColor: recRGBA;
- StartCapStyle: byte = 0; EndCapStyle: byte = 0;
- JoinStyle: byte = 0): TSWFMorphLineStyle2;
- function SetRadialGradient(StartGradient, EndGradient: array of recRGBA; StartXc, StartYc, EndXc, EndYc: byte):
- TSWFMorphGradientFill; overload;
- function SetRadialGradient(StartC1, StartC2, EndC1, EndC2: recRGBA; StartXc, StartYc, EndXc, EndYc: byte):
- TSWFMorphGradientFill; overload;
- function SetSolidColor(StartC, EndC: recRGBA): TSWFMorphColorFill;
- procedure SetStartBound(XMin, YMin, XMax, YMax: integer);
- procedure WriteToStream(be: TBitsEngine); override;
- property EndEdges: TFlashEdges read FEndEdges;
- property FillStyleLeft: Word read FFillStyleLeft write SetFillStyleLeft;
- property FillStyleNum: Word read FFillStyleLeft write SetFillStyleleft;
- property LineStyleNum: Word read FLineStyleNum write SetLineStyleNum;
- property StartEdges: TFlashEdges read FStartEdges;
- property XCenter: LongInt read GetCenterX write SetCenterX;
- property YCenter: LongInt read GetCenterY write SetCenterY;
- end;
- TFlashPlaceObject = class (TFlashObject)
- public
- constructor Create(owner: TFlashMovie; VObject: TFlashVisualObject; depth: word); virtual;
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- function AddActionEvent(FE: TSWFClipEvents): TSWFClipActionRecord;
- {$IFDEF ASCompiler}
- function CompileEvent(src: TStrings): boolean; overload;
- function CompileEvent(src: TStream): boolean; overload;
- function CompileEvent(src: string): boolean; overload;
- function CompileEvent(FileName: string; unicode: boolean): boolean; overload;
- {$ENDIF}
- function FindActionEvent(FE: TSWFClipEvent; CreateNoExist: boolean = true): TSWFClipActionRecord;
- procedure InitColorTransform(hasADD: boolean; addR, addG, addB, addA: Smallint; hasMULT: boolean; multR, multG, multB,
- multA: Smallint; hasAlpha: boolean);
- function FindFilter(fid: TSWFFilterID): TSWFFilter;
- function MinVersion: Byte; override;
- function OnClick: TFlashActionScript;
- function OnConstruct: TFlashActionScript;
- function OnData: TFlashActionScript;
- function OnDragOut: TFlashActionScript;
- function OnDragOver: TFlashActionScript;
- function OnEnterFrame: TFlashActionScript;
- function OnInitialize: TFlashActionScript;
- function OnKeyDown: TFlashActionScript;
- function OnKeyPress(Key: byte = 0): TFlashActionScript;
- function OnKeyUp: TFlashActionScript;
- function OnLoad: TFlashActionScript;
- function OnMouseDown: TFlashActionScript;
- function OnMouseMove: TFlashActionScript;
- function OnMouseUp: TFlashActionScript;
- function OnPress: TFlashActionScript;
- function OnRelease: TFlashActionScript;
- function OnReleaseOutside: TFlashActionScript;
- function OnRollOut: TFlashActionScript;
- function OnRollOver: TFlashActionScript;
- function OnUnload: TFlashActionScript;
- procedure SetPosition(X, Y: longint);
- procedure SetRotate(angle: single);
- procedure SetScale(ScaleX, ScaleY: single);
- procedure SetSkew(SkewX, SkewY: single);
- procedure SetTranslate(X, Y: longint);
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure WriteToStream(be: TBitsEngine); override;
- property AdjustColor: TSWFColorMatrixFilter read GetColorMatrixFilter;
- property Bevel: TSWFBevelFilter read GetBevelFilter;
- property BlendMode: TSWFBlendMode read GetBlendMode write SetBlendMode;
- property Blur: TSWFBlurFilter read GetBlurFilter;
- property CharacterID: Word read GetCharacterID write SetCharacterID;
- property ClipDepth: Word read GetClipDepth write SetClipDepth;
- property ColorTransform: TSWFColorTransform read GetColorTransform;
- property ColorMatrix: TSWFColorMatrixFilter read GetColorMatrixFilter;
- property Convolution: TSWFConvolutionFilter read GetConvolutionFilter;
- property Depth: Word read GetDepth write SetDepth;
- property FilterList: TSWFFilterList read GetFilterList;
- property GradientBevel: TSWFGradientBevelFilter read GetGradientBevelFilter;
- property GradientGlow: TSWFGradientGlowFilter read GetGradientGlowFilter;
- property Glow: TSWFGlowFilter read GetGlowFilter;
- property Matrix: TSWFMatrix read GetMatrix;
- property Name: string read GetName write SetName;
- property Ratio: Word read GetRatio write SetRatio;
- property RemoveDepth: Boolean read GetRemoveDepth write SetRemoveDepth;
- property Shadow: TSWFDropShadowFilter read GetShadowFilter;
- property TranslateX: LongInt read GetTranslateX write SetTranslateX;
- property TranslateY: LongInt read GetTranslateY write SetTranslateY;
- property UseBitmapCaching: Boolean read GetUseBitmapCaching write
- SetUseBitmapCaching;
- property VisualObject: TFlashVisualObject read FVisualObject write FVisualObject;
- end;
- TFlashPlaceVideo = class;
- // =================== TFlashVideo ========================
- TWriteFrameInfo = record
- Frame: Word;
- ID: Word;
- Depth: Word;
- end;
- TWriteFrame = procedure (be:TBitsEngine; P: TWriteFrameInfo) of object;
- TPlaceFrame = procedure (be:TBitsEngine; P: TWriteFrameInfo; Ob: TFlashPlaceObject) of object;
- TVideoHeader = record
- Signature: array [0..2] of byte;
- Version: Byte;
- TypeFlag: Byte;
- CodecInfo: Byte;
- DataOffset: LongInt;
- XDim: LongInt;
- YDim: LongInt;
- Frames: LongInt;
- end;
- TFlashVideo = class (TFlashVisualObject)
- public
- constructor Create(owner: TFlashMovie; FileName: string); overload;
- constructor Create(owner: TFlashMovie; Source: TStream); overload;
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure WriteToStream(be: TBitsEngine); override;
- property FLV: TFLVData read FFLV;
- property Height: Word read GetHeight;
- property OnPlaceFrame: TPlaceFrame read FPlaceFrame write FPlaceFrame;
- property OnWriteFrame: TWriteFrame read FWriteFrame write FWriteFrame;
- property Width: Word read GetWidth;
- end;
- // ============= TFlashSprite ======================
- TFlashSprite = class (TFlashVisualObject)
- public
- constructor Create(owner: TFlashMovie); virtual;
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- function MinVersion: Byte; override;
- function PlaceMorphShape(MS: TFlashMorphShape; Depth, NumFrame: word): TFlashPlaceObject;
- function PlaceObject(shape: TFlashVisualObject; depth: word): TFlashPlaceObject; overload;
- function PlaceObject(shape, mask: TFlashVisualObject; depth: word): TFlashPlaceObject; overload;
- function PlaceObject(depth: word): TFlashPlaceObject; overload;
- function PlaceVideo(F: TFlashVideo; depth: word): TFlashPlaceVideo;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure RemoveObject(depth: word; shape: TFlashVisualObject = nil);
- procedure ShowFrame(c: word = 1);
- function StartSound(snd: TFlashSound): TSWFStartSound; overload;
- function StartSound(ID: word): TSWFStartSound; overload;
- procedure StoreFrameActions;
- procedure WriteToStream(be: TBitsEngine); override;
- property BackgroundSound: TFlashSound read GetBackgrondSound;
- property CurrentFrameNum: Integer read FCurrentFrameNum write SetCurrentFrameNum;
- property EnableBGSound: Boolean read FEnableBGSound write FEnableBGSound;
- property FrameActions: TFlashActionScript read GetFrameActions;
- property FrameCount: Word read GetFrameCount write SetFrameCount;
- property FrameLabel: string read FFrameLabel write FFrameLabel;
- property InitActions: TFlashActionScript read GetInitActions;
- property ObjectList: TObjectList read GetObjectList;
- property Sprite: TSWFDefineSprite read FSprite;
- property MaxDepth: word read FMaxDepth;
- property VideoList[Index: Integer]: TFlashPlaceVideo read GetVideoList;
- property VideoListCount: Integer read GetVideoListCount;
- end;
- TFlashMovieClip = TFlashSprite;
- TFlashPlaceVideo = class (TFlashPlaceObject)
- public
- constructor Create(owner: TFlashMovie; video: TFlashVisualObject; depth: word); override;
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure WriteToStream(be: TBitsEngine; Frame:Word);
- property AutoReplay: Boolean read FAutoReplay write FAutoReplay;
- property CharacterID: Word read GetCharacterID;
- property EnableSound: Boolean read FEnableSound write SetEnableSound;
- property OnPlaceFrame: TPlaceFrame read FPlaceFrame write FPlaceFrame;
- property OnWriteFrame: TWriteFrame read FWriteFrame write FWriteFrame;
- property SpriteParent: TFlashSprite read FSpriteParent write FSpriteParent;
- property StartFrame: Word read FStartFrame write FStartFrame;
- property Video: TFlashVideo read GetVideo;
- end;
- // ================= Text =========================
- TFlashChar = class (TObject)
- public
- constructor Create(code: word; wide: boolean);
- destructor Destroy; override;
- procedure Assign(Source: TObject);
- property Code: Word read FCode write SetCode;
- property Edges: TFlashEdges read FEdges;
- property GlyphAdvance: Integer read FGlyphAdvance write FGlyphAdvance;
- property IsUsed: boolean read FIsUsed write FIsUsed;
- property isWide: Boolean read FWide;
- property Kerning: TSWFKerningRecord read FKerning write FKerning;
- property ListEdges: TObjectList read FListEdges;
- property ShapeInit: Boolean read FShapeInit write FShapeInit;
- property WideCode: Word read FWideCode;
- end;
- TFontUsing = set of (fuStaticText, fuDynamicText);
- TFlashFont = class (TFlashIDObject)
- public
- constructor Create(owner: TFlashMovie); overload;
- constructor Create(owner: TFlashMovie; asDevice: boolean; Name: string; bold, italic: boolean; size: word); overload;
- destructor Destroy; override;
- procedure AddChars(s: ansistring); overload;
- procedure AddChars(chset: TCharSets); overload;
- {$IFNDEF VER130}
- procedure AddChars(s: WideString); overload;
- {$ENDIF}
- procedure AddChars(min, max: word); overload;
- procedure AddCharsW(s: WideString);
- function AddEmpty(Ch: word): Boolean;
- procedure Assign(Source: TBasedSWFObject); override;
- function CalcMetric(V: longint): LongInt;
- procedure FillCharsInfo;
- function GetTextExtentPoint(s: string): TSize; overload;
- {$IFNDEF VER130}
- function GetTextExtentPoint(s: WideString): TSize; overload;
- {$ENDIF}
- function GetTextExtentPointW(s: WideString): TSize;
- procedure LoadFromSWFObject(Src: TSWFDefineFont2);
- procedure LoadFromSWFFile(FileName: string);
- procedure LoadFromSWFStream(src: TStream);
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure WriteToStream(be: TBitsEngine); override;
- property AntiAlias: Boolean read GetAntiAlias write SetAntiAlias;
- property Ascent: Word read FAscent write FAscent;
- property AsDevice: Boolean read FAsDevice write FAsDevice;
- property Bold: Boolean read FBold write FBold;
- property CharInfo[Code: Integer]: TFlashChar read GetCharInfo;
- property CharInfoInd[Index: Integer]: TFlashChar read GetCharInfoInd;
- property CharList: TObjectList read GetCharList;
- property Descent: Word read FDescent write FDescent;
- property EncodingType: Byte read FEncodingType write FEncodingType;
- property FontCharset: Byte read FFontCharset write SetFontCharset;
- property FontInfo: TLogFont read FFontInfo write SetFontInfo;
- property FontUsing: TFontUsing read FUsing write FUsing;
- property IncludeKerning: Boolean read FIncludeKerning write FIncludeKerning;
- property Italic: Boolean read FItalic write FItalic;
- property LanguageCode: Byte read FLanguageCode write FLanguageCode;
- property Layout: Boolean read FHasLayout write SetHasLayout;
- property Leading: Word read FLeading write FLeading;
- property Name: string read FName write FName;
- property Size: Word read GetSize write SetSize;
- property SmallText: Boolean read FSmallText write FSmallText;
- property WideCodes: Boolean read GetWideCodes;
- end;
- TFlashCustomData = class (TFlashObject)
- public
- constructor Create(owner: TFlashMovie; FileName:string = ''); overload;
- constructor Create(owner: TFlashMovie; S: TStream; Size: longint = 0); overload;
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- function MinVersion: Byte; override;
- procedure WriteToStream(be: TBitsEngine); override;
- property Data: TMemoryStream read FData;
- property TagID: Integer read FTagID write FTagID;
- property WriteHeader: Boolean read FWriteHeader write FWriteHeader;
- end;
- // ******************* TFlashText ***********************
- TFlashText = class (TFlashVisualObject)
- public
- constructor Create(owner: TFlashMovie; s: ansistring); overload;
- constructor Create(owner: TFlashMovie; s: ansistring; c: recRGBA; f: TFlashFont; P: TPoint; Align: byte); overload;
- constructor Create(owner: TFlashMovie; s: ansistring; c: recRGBA; f: TFlashFont; R: TRect); overload;
- {$IFNDEF VER130}
- constructor Create(owner: TFlashMovie; s: WideString; c: recRGBA; f: TFlashFont; P: TPoint; Align: byte); overload;
- constructor Create(owner: TFlashMovie; s: WideString; c: recRGBA; f: TFlashFont; R: TRect); overload;
- {$ENDIF}
- constructor CreateW(owner: TFlashMovie; s: WideString; c: recRGBA; f: TFlashFont; P: TPoint; Align: byte); overload;
- constructor CreateW(owner: TFlashMovie; s: WideString; c: recRGBA; f: TFlashFont; R: TRect); overload;
- destructor Destroy; override;
- procedure Assign(Source: TBasedSWFObject); override;
- function GetTextExtentPoint: TSize;
- function MinVersion: Byte; override;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- procedure WriteToStream(be: TBitsEngine); override;
- property Align: TSWFTextAlign read FAlign write SetAlign;
- property AutoSize: Boolean read FAutoSize write FAutoSize;
- property Border: Boolean read FBorder write FBorder;
- property Bounds: TSWFRect read FBounds;
- property CharSpacing: Integer read GetCharSpacing write SetCharSpacing;
- property Color: TSWFRGBA read GetColor;
- property DynamicText: Boolean read GetDynamicText write SetDynamicText;
- property Font: TFlashFont read FFont write SetFont;
- property HTML: Boolean read FHTML write SetHTML;
- property Indent: Integer read GetIndent write SetIndent;
- property Leading: Integer read GetLeading write SetLeading;
- property LeftMargin: Integer read GetLeftMargin write SetLeftMargin;
- property Matrix: TSWFMatrix read GetMatrix;
- property MaxLength: Integer read FMaxLength write SetMaxLength;
- property Multiline: Boolean read FMultiline write FMultiline;
- property NoSelect: Boolean read FNoSelect write FNoSelect;
- property Password: Boolean read FPassword write FPassword;
- property ReadOnly: Boolean read FReadOnly write FReadOnly;
- property RightMargin: Integer read GetRightMargin write SetRightMargin;
- property Text: AnsiString read FText write SetText;
- property TextHeight: Word read GetTextHeight write SetTextHeight;
- property UseOutlines: Boolean read FUseOutlines write SetUseOutlines;
- property VarName: AnsiString read FVarName write FVarName;
- property WideText: WideString read FWideText write SetWideText;
- property WordWrap: Boolean read FWordWrap write FWordWrap;
- end;
- //================== TFlashButton =======================
- TFlashButtonEvent = (beRollOver, beRollOut, bePress, beRelease,
- beDragOver, beDragOut, beReleaseOutside, beMenuDragOver, beMenuDragOut);
- TFlashButtonEvents = set of TFlashButtonEvent;
- TFlashButton = class (TFlashVisualObject)
- public
- constructor Create(owner: TFlashMovie; hasmenu: boolean = false; advMode: boolean = true);
- destructor Destroy; override;
- function Actions: TFlashActionScript;
- function AddCondAction(FE: TFlashButtonEvents): TSWFButtonCondAction;
- function AddRecord(Shape: TFlashVisualObject; BS: TSWFButtonStates; depth: word = 1): TSWFButtonRecord; overload;
- function AddRecord(Sprite: TFlashSprite; BS: TSWFButtonStates; depth: word = 1): TSWFButtonRecord; overload;
- function AddRecord(ID: Word; BS: TSWFButtonStates; depth: word = 1): TSWFButtonRecord; overload;
- procedure Assign(Source: TBasedSWFObject); override;
- {$IFDEF ASCompiler}
- function CompileEvent(src: TStrings): boolean; overload;
- function CompileEvent(src: TStream): boolean; overload;
- function CompileEvent(src: string): boolean; overload;
- function CompileEvent(FileName: string; unicode: boolean): boolean; overload;
- {$ENDIF}
- function FindActionEvent(FE: TFlashButtonEvent; CreateNoExist: boolean = true): TSWFActionList;
- function MinVersion: Byte; override;
- function OnClickActions: TFlashActionScript;
- function OnDragOutActions: TFlashActionScript;
- function OnDragOverActions: TFlashActionScript;
- function OnMenuDragOutActions: TFlashActionScript;
- function OnMenuDragOverActions: TFlashActionScript;
- function OnPressActions: TFlashActionScript;
- function OnReleaseActions: TFlashActionScript;
- function OnReleaseOutsideActions: TFlashActionScript;
- function OnRollOutActions: TFlashActionScript;
- function OnRollOverActions: TFlashActionScript;
- {$IFDEF XMLSupport}
- procedure ReadFromXMLNode(Node: IXMLNode; Settings: TXMLReadWriteSettings); override;
- {$ENDIF}
- function SndPress: TSWFStartSound;
- function SndRelease: TSWFStartSound;
- function SndRollOut: TSWFStartSound;
- function SndRollOver: TSWFStartSound;
- procedure WriteToStream(be: TBitsEngine); override;
- end;
- TFlashCanvas = class;
- TSpriteManagerType = (csDefault, csMetaFile, csClipp, csWorldTransform, csPath, csText, csDC);
- TGDIDrawMode = (dmNormal, dmPath);
- // ---------------- TMetaFont ----------------------
- // TMetaFont = class (TObject)
- // protected
- // FFlashFont: TFlashFont;
- // FFMFont: TFont;
- // FFontPresent: Boolean;
- // FInfo: TExtLogFontW;
- // FMColor: recRGBA;
- // FTextMetric: TTextMetricW;
- // public
- // procedure GetMetrixFont;
- // procedure ReadFontParam(Ft: TLogFontW);
- // procedure WriteFontParam(Ft: TFlashFont);
- // property FlashFont: TFlashFont read FFlashFont write FFlashFont;
- // property FMFont: TFont read FFMFont write FFMFont;
- // property FontPresent: Boolean write FFontPresent;
- // property Info: TExtLogFontW read FInfo write FInfo;
- // end;
- // ================ Flash CANVAS ===================
- TFSpriteCanvas = class (TFlashSprite)
- public
- constructor Create(owner: TFlashMovie); override;
- property Parent: TFSpriteCanvas read FParent write FParent;
- end;
- TRenderOptions = set of (roUseBuffer, roHiQualityBuffer, roOptimization);
- TFlashCanvas = class(TCanvas)
- public
- constructor Create(Owner: TFlashMovie);
- destructor Destroy; override;
- function isNeedBuffer: boolean;
- procedure Clear;
- procedure DrawMetafile(Dest: TRect; MF: TMetafile; stretch: boolean);
- procedure Draw(X, Y: Integer; Graphic: TGraphic);
- procedure StretchDraw(const R: TRect; Graphic: TGraphic);
- function Place(depth: word; clear: boolean = true; dest: TFlashSprite = nil): TFlashPlaceObject;
- property RootSprite: TFlashSprite read GetRootSprite;
- property EmbeddedFont: Boolean read FEmbeddedFont write FEmbeddedFont;
- property Owner: TFlashMovie read FOwner write FOwner;
- property RenderOptions: TRenderOptions read FRenderOptions write FRenderOptions;
- end;
- // ================ TFlashObjectList ===================
- TFlashObjectList = class (TObject)
- public
- constructor Create;
- destructor Destroy; override;
- procedure Add(Obj: TFlashIDObject);
- property Count: Word read GetCount;
- end;
- TFlashButtonList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashButton;
- function Last: TFlashButton;
- property Button[Index: word]: TFlashButton read GetButton; default;
- end;
- TFlashFontList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashFont;
- function FindByFont(F: TFont; CompareSize: boolean): TFlashFont;
- function Last: TFlashFont;
- property Font[Index: word]: TFlashFont read GetFont; default;
- end;
- TFlashImageList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashImage;
- function Last: TFlashImage;
- property Image[Index: word]: TFlashImage read GetImage; default;
- end;
- TFlashMorphShapeList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashMorphShape;
- function Last: TFlashMorphShape;
- property Shape[Index: word]: TFlashMorphShape read GetShape; default;
- end;
- TFlashShapeList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashShape;
- function Last: TFlashShape;
- property Shape[Index: word]: TFlashShape read GetShape; default;
- end;
- TFlashSoundList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashSound;
- function Last: TFlashSound;
- property Sound[Index: word]: TFlashSound read GetSound; default;
- end;
- TFlashSpriteList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashSprite;
- function Last: TFlashSprite;
- property Sprite[Index: word]: TFlashSprite read GetSprite; default;
- end;
- TFlashTextList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashText;
- function Last: TFlashText;
- property Text[Index: word]: TFlashText read GetText; default;
- end;
- TFlashVideoList = class (TFlashObjectList)
- public
- function GetFromID(ID: word): TFlashVideo;
- function Last: TFlashVideo;
- property Video[Index: word]: TFlashVideo read GetVideo; default;
- end;
- TExternalIncludeMode = (eimRoot, eimResource, eimNoFrameRoot, eimSprite);
- TFlashExternalMovie = class (TFlashIDObject)
- public
- constructor Create(owner: TFlashMovie; src: string); overload;
- constructor Create(owner: TFlashMovie; src: TStream); overload;
- destructor Destroy; override;
- function IDObjectsCount: Word;
- property RenameFontName: boolean read FRenameFontName write FRenameFontName;
- procedure Renumber(start: word);
- procedure WriteToStream(be: TBitsEngine); override;
- property IncludeMode: TExternalIncludeMode read FIncludeMode write FIncludeMode;
- property Reader: TSWFStreamReader read FReader;
- property Sprite: TFlashSprite read FSprite;
- property OnWriteTag: TSWFProcessTagEvent read FOnWriteTag write FOnWriteTag;
- end;
- // ================ TFlashMovie ========================
- TBackgroundMode = (bmNone, bmColor);
- TAddObjectMode = (amEnd, amCurrentFrame, amHomeCurrentFrame, amFromStartFrame);
- TFlashFilterQuality = (fqLow, fqMedium, fqHigh);
- TFlashFilterSettings = class(TObject)
- public
- constructor Create;
- destructor Destroy; override;
- property Angle: single read FAngle write FAngle;
- property BlurX: Integer read FBlurX write FBlurX;
- property BlurY: Integer read FBlurY write FBlurY;
- property Brightness: Integer read FBrightness write FBrightness;
- property Contrast: Integer read FContrast write FContrast;
- property ShadowColor: TSWFRGBA read FShadowColor write FShadowColor;
- property Distance: Integer read FDistance write FDistance;
- property Knockout: Boolean read FKnockout write FKnockout;
- property Quality: TFlashFilterQuality read FQuality write FQuality;
- property GlowColor: TSWFRGBA read FGlowColor write FGlowColor;
- property HideObject: Boolean read FHideObject write FHideObject;
- property Hue: Integer read FHue write FHue;
- property Inner: Boolean read FInner write FInner;
- property OnTop: Boolean read FOnTop write FOnTop;
- property Saturation: Integer read FSaturation write FSaturation;
- property Strength: word read FStrength write FStrength;
- end;
- {$IFDEF XMLSupport}
- TFlashXMLNodeReadEvent = procedure (sender: TFlashMovie; Node: IXMLNode; var Default: boolean) of object;
- {$ENDIF}
- {$IFDEF ASCompiler}
- TBaseCompileContext = class(TObject)
- public
- constructor Create(owner: TFlashMovie); virtual;
- procedure LoadClassTable(ClassPath: string); virtual; abstract;
- procedure AddIncludePath(IncludePath: string); virtual; abstract;
- procedure CompileAction(
- ASource: TStream;
- ASwfCode: TFlashActionScript); overload; virtual; abstract;
- procedure CompileAction(
- ASource: TStream;
- AFlashButton: TFlashButton); overload; virtual; abstract;
- procedure CompileAction(
- ASource: TStream;
- APlaceObject: TFlashPlaceObject); overload; virtual; abstract;
- property Movie: TFlashMovie read FMovie write FMovie;
- property Listing: TStream read GetListing;
- end;
- {$ENDIF}
- TFlashMovie = class (TBasedSWFStream)
- public
- constructor Create(XMin, YMin, XMax, YMax: integer; fps: single; sc: TSWFSystemCoord = scTwips); override;
- {$IFDEF XMLSupport}
- constructor CreateFromXML(const FileName: string); overload;
- constructor CreateFromXML(XML: IXMLDocument); overload;
- function LoadFromXML(XML: IXMLDocument; asNew: boolean): boolean; override;
- {$ENDIF}
- destructor Destroy; override;
- function AddArc(XCenter, YCenter, RadiusX, RadiusY: longint; StartAngle, EndAngle: single; closed: boolean = true):
- TFlashShape; overload;
- function AddArc(XCenter, YCenter, Radius: longint; StartAngle, EndAngle: single; closed: boolean = true): TFlashShape;
- overload;
- function AddButton(hasmenu: boolean = false; advMode: boolean = true): TFlashButton;
- function AddCircle(XCenter, YCenter, Radius: integer): TFlashShape;
- function AddCubicBezier(P0, P1, P2, P3: TPoint): TFlashShape;
- function AddCurve(P1, P2, P3: TPoint): TFlashShape;
- function AddDiamond(XMin, YMin, XMax, YMax: integer): TFlashShape;
- function AddDynamicText(varname, init: ansistring; c: recRGBA; f: TFlashFont; R: TRect): TFlashText; overload;
- {$IFNDEF VER130}
- function AddDynamicText(varname: ansistring; init: WideString; c: recRGBA; f: TFlashFont; R: TRect): TFlashText; overload;
- {$ENDIF}
- function AddDynamicTextW(varname: ansistring; init: WideString; c: recRGBA; f: TFlashFont; R: TRect): TFlashText;
- function AddEllipse(XMin, YMin, XMax, YMax: integer): TFlashShape; overload;
- function AddEllipse(R: TRect): TFlashShape; overload;
- function AddExternalMovie(src: string; IM: TExternalIncludeMode; autorenum: boolean = true): TFlashExternalMovie;
- overload;
- function AddExternalMovie(src: TStream; IM: TExternalIncludeMode; autorenum: boolean = true): TFlashExternalMovie;
- overload;
- function AddFont: TFlashFont; overload;
- function AddFont(FontInfo: TFont; device: boolean = true): TFlashFont; overload;
- function AddFont(LogFont: TLogFont; device: boolean = true): TFlashFont; overload;
- function AddFont(Name: string; bold, italic: boolean; size: integer; device: boolean = true): TFlashFont; overload;
- procedure AddIDObject(Obj: TFlashIDObject; SetID: boolean = true);
- function AddImage(fn: string = ''): TFlashImage;
- function AddLine(X1, Y1, X2, Y2: longint): TFlashShape;
- function AddMorphShape(shape: TFlashMorphShape = nil): TFlashMorphShape;
- function AddPie(XCenter, YCenter, Radius: longint; StartAngle, EndAngle: single): TFlashShape; overload;
- function AddPie(XCenter, YCenter, RadiusX, RadiusY: longint; StartAngle, EndAngle: single): TFlashShape; overload;
- function AddPolygon(AP: array of TPoint): TFlashShape;
- function AddPolyline(AP: array of TPoint): TFlashShape;
- function AddRectangle(XMin, YMin, XMax, YMax: longint): TFlashShape; overload;
- function AddRectangle(R: TRect): TFlashShape; overload;
- function AddRing(XCenter, YCenter, Radius1, Radius2: integer): TFlashShape;
- function AddRoundRect(XMin, YMin, XMax, YMax, Radius: longint): TFlashShape; overload;
- function AddRoundRect(R: TRect; Radius: longint): TFlashShape; overload;
- function AddShape(shape: TFlashShape = nil): TFlashShape;
- function AddShapeImage(fn: string): TFlashShape; overload;
- function AddShapeImage(img: TFlashImage): TFlashShape; overload;
- function AddSound(fn: string): TFlashSound; overload;
- function AddSound(Src: TMemoryStream; isMP3: boolean): TFlashSound; overload;
- function AddSprite(VO: TFlashVisualObject = nil): TFlashSprite;
- function AddSquare(XMin, YMin, Side: integer): TFlashShape; overload;
- function AddSquare(XMin, YMin, XMax, YMax: integer): TFlashShape; overload;
- function AddStar(X, Y, R1, R2: longint; NumPoint: word; curve: boolean = false): TFlashShape;
- function AddText: TFlashText; overload;
- function AddText(s: ansistring; c: recRGBA; f: TFlashFont; P: TPoint; Align: TSWFTextAlign = taLeft): TFlashText; overload;
- function AddText(s: ansistring; c: recRGBA; f: TFlashFont; R: TRect): TFlashText; overload;
- {$IFNDEF VER130}
- function AddText(s: WideString; c: recRGBA; f: TFlashFont; P: TPoint; Align: TSWFTextAlign = taLeft): TFlashText; overload;
- function AddText(s: WideString; c: recRGBA; f: TFlashFont; R: TRect): TFlashText; overload;
- {$ENDIF}
- function AddTextW(s: WideString; c: recRGBA; f: TFlashFont; P: TPoint; Align: TSWFTextAlign = taLeft): TFlashText; overload;
- function AddTextW(s: WideString; c: recRGBA; f: TFlashFont; R: TRect): TFlashText; overload;
- function AddVideo(FileName: string): TFlashVideo;
- function AddVideoFromStream(MS: TMemoryStream): TFlashVideo;
- function CalcFramesCount: Word;
- procedure Clear;
- function ExportAssets(name: string; id: word): TSWFExportAssets; overload;
- function ExportAssets(name: string; Sprite: TFlashSprite): TSWFExportAssets; overload;
- function FindObjectFromID(ID: word): TFlashIDObject;
- function FramePos(num: word): longint; override;
- function GetMinVersion: Byte;
- function ImportAssets(filename: string): TSWFImportAssets; overload;
- function ImportAssets(URL, name: string): TSWFImportAssets; overload;
- procedure MakeStream; override;
- procedure MoveResource(ToFrame, StartFrom, EndFrom: integer); override;
- function PlaceObject(shape, mask: TFlashVisualObject; depth: word): TFlashPlaceObject; overload;
- function PlaceObject(shape: TFlashVisualObject; depth: word): TFlashPlaceObject; overload;
- function PlaceObject(depth: word): TFlashPlaceObject; overload;
- function PlaceVideo(F: TFlashVideo; depth: word): TFlashPlaceVideo;
- procedure RemoveObject(depth: word; shape: TFlashVisualObject = nil);
- procedure SetTabIndex(Depth, TabIndex: word);
- procedure ShowFrame(c: word = 1);
- function StartSound(snd: TFlashSound; Loop: word = 1): TSWFStartSound; overload;
- function StartSound(ID: word; Loop: word = 1): TSWFStartSound; overload;
- procedure StoreFrameActions;
- property AddObjectMode: TAddObjectMode read FAddObjectMode write SetAddObjectMode;
- {$IFDEF ASCompiler}
- property ASCompiler: TBaseCompileContext read GetASCompiler write FASCompiler;
- property ASCompilerLog: TStream read GetASCompilerLog write FASCompilerLog;
- property ASCompilerOptions: TCompileOptions read FASCompilerOptions write SetCompilerOptions;
- {$ENDIF}
- property BackgroundColor: TSWFRGB read GetBackgroundColor;
- property BackgroundMode: TBackgroundMode read FBackgroundMode write FBackgroundMode;
- property BackgroundSound: TFlashSound read GetBackgrondSound;
- property Buttons: TFlashButtonList read GetButtons;
- property Canvas: TFlashCanvas read GetCanvas;
- property CurrentObjID: Word read FCurrentObjID write FCurrentObjID;
- property CurrentFrameNum: Integer read FCurrentFrameNum write SetCurrentFrameNum;
- property CorrectImageFill: boolean read FCorrectImageFill write SetCorrectImageFill;
- property EnableBgSound: Boolean read FEnableBgSound write FEnableBgSound;
- property Fix32bitImage: boolean read FFix32bitImage write FFix32bitImage;
- property Fonts: TFlashFontList read GetFonts;
- property FrameActions: TFlashActionScript read GetFrameActions;
- property FrameLabel: string read FFrameLabel write FFrameLabel;
- property GlobalFilterSettings: TFlashFilterSettings read GetGlobalFilterSettings;
- property HasMetadata: boolean read GetHasMetadata write SetHasMetadata;
- property Images: TFlashImageList read GetImages;
- property MaxDepth: word read FMaxDepth;
- property MetaData: ansistring read FMetaData write SetMetadata;
- property MorphShapes: TFlashMorphShapeList read GetMorphShapes;
- property ObjectList: TObjectList read GetObjectList write SetObjectList;
- property Password: string read FPassword write SetPassword;
- property Protect: Boolean read FProtect write FProtect;
- property Shapes: TFlashShapeList read GetShapes;
- property Sounds: TFlashSoundList read GetSounds;
- property Sprites: TFlashSpriteList read GetSprites;
- property Texts: TFlashTextList read GetTexts;
- property VideoList[index: LongInt]: TFlashPlaceVideo read GetVideoStream;
- property VideoListCount: Integer read GetVideoListCount;
- property Videos: TFlashVideoList read GetVideos;
- property UseFileAttributes: boolean read FUseFileAttributes write SetUseFileAttributes;
- property UseNetwork: boolean read GetUseNetwork write SetUseNetwork;
- {$IFDEF XMLSupport}
- property OnXMLNodeRead: TFlashXMLNodeReadEvent read FOnXMLNodeRead write FOnXMLNodeRead;
- {$ENDIF}
- property OnLoadCustomImage: TLoadCustomImageEvent read FOnLoadCustomImage write FOnLoadCustomImage;
- end;
- var
- LoadCustomImageProc: TLoadCustomImageProc = nil;
- {$IFDEF XMLSupport}
- Function MakeSWFFromXML(XMLfile, SWFfile: string): boolean;
- {$ENDIF}
- Procedure CreateEmptySWF(fn: string; bg: recRGB);
- implementation