LoadFromStream(Stream: IIOStream);
LoadFromStream(Stream: System.IO.Stream);
Stream. The stream from which a Flash object is loaded.
the LoadFromStream method loads the Flash object from the stream that is passed by the Stream parameter.
On loading a Flash objects the following internal parameters will be ignored:
AlignMode. Parameter value is replaced with corresponding value of the AlignMode property.
FrameNum. Parameter value is replaced with corresponding value of the FrameNum property.
Loop. Parameter value is replaced with corresponding value of the Loop property.
Playing. Parameter value is replaced with corresponding value of the Playing property.
Quality. Parameter value is replaced with corresponding value of the Quality property.
ScaleMode. Parameter value is replaced with corresponding value of the ScaleMode property.
Executing this example requires a form, a button positioned on this form, the FlashBox component with the identifier FlashBox1, and a document with the identifier Flash_1 that stores a Flash file to be available in the repository.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Doc: IDocument;
Begin
MB := MetabaseClass.Active;
Doc := MB.ItemById("Flash_1").Bind As IDocument;
FlashBox1.LoadFromStream(Doc.GetAsStream);
End Sub Button1OnClick;
After executing this example clicking the button loads a Flash object stored in the repository document with the identifier Flash_1 into the FlashBox1 component.
Executing this example requires a form, a button positioned on this form, the FlashBoxNet component with the identifier FlashBoxNet1, and a document with the identifier Flash_1 that stores a Flash file to be available in the repository.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
Doc: IDocument;
Begin
MB := Self.Metabase;
Doc := MB.ItemById["Flash_1"].Bind() As IDocument;
FlashBoxNet1.LoadFromStream(Doc.GetAsStream());
End Sub;
After executing this example clicking the button loads the Flash object stored in the repository document with the identifier Flash_1 into the FlashBoxNet1 component.
See also: