BB FlashBack SDK: FBMovie

ExportFramesSequencesToSWF

Description

Exports a number of sequences of frames to Flash (SWF) file format, with a specified filename and parameters.

The sequences are combined into one SWF movie.

Syntax

[C#/C++]
public Boolean ExportFramesSequencesToSWF (BSTR Filename,  IFBExportToSWFParams* ExportParams, VARIANT FramesSequences,  long SequencesCount);

[VB.NET]
Public Function ExportFramesSequencesToSWF (ByVal Filename As String, ByRef ExportParams As FBExportToSWFParams, ByRef FramesSequences As Object, ByVal SequencesCount As Long) As Boolean

 

Parameters

Filename : the name of the SWF file to be created.

ExportParams : pointer to an FBExportToSWFParams object that contains the parameters to be used in the export process. It should not be null.

FramesSequences : pointer to an array of 4-byte integers. The array contains pairs of values defining the start frame and number of frames to be exported.

SequencesCount: the number of pairs of integers in FramesSequence. It must be larger than zero.
 

Return Values

If the function fails, the return value is zero.

If the function succeeds, the return value is non-zero.
 

Example code

C# example:

int[] frames = new int[4];

frames[0] = 0;   //start frame of first sequence
frames[1] = 81;  //frames count of first sequence
frames[2] = 143;  //start frame of the second sequence
frames[3] = 52;  //frames count of the second sequence

FBExportToSWFParamsClass fbExportParams = new FBExportToSWFParamsClass();

fbExportParams.ShowOptions = true;

fbMovie.GetDefaultSWFParams(fbExportParams);

fbMovie.ExportFramesSequencesToSWF("c:\\test.swf", fbExportParams, frames, 2);

//'2' is the number of frames sequences

 

Remarks

Two or three files are created - one or two SWF files and one HTML file. See About BB FlashBack SDK Flash Exports for details on single and multiple SWF exports.

The HTML file is a page that displays the SWF movie as an embedded object. If a value of "mymovie.swf" is passed in as the FileName parameter, the files would be named "mymovie.swf", "mymovie.html" and (optionally, if multiple SWFs are exported) "mymovie_toolbar.swf".

If the ShowOptions parameter of the export parameters object is set to True, a dialog will be displayed that enables the user to change export parameters. If ShowOptions is set to False, the export takes place using the parameters specified in the export parameters object.

ProgressorEventEx events will be generated on the FBEditor object while the export process runs, enabling implementation of a progress indicator. Set the Stop parameter on progressor events to stop the export.

See Also

FBMovie::GetDefaultSWFParams  FBEditor::ProgressorEventEx  About Export Parameter classes