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 object 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 the example requires a form, a button on this form, the FlashBox component with the FlashBox1 identifier, and a document with the Flash_1 identifier 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 the example clicking the button loads a Flash object stored in the repository document with the Flash_1 identifier into the FlashBox1 component.
Executing the example requires a form, a button on this form, the FlashBoxNet component with the FlashBoxNet1 identifier, and a document with the Flash_1 identifier 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 the example clicking the button loads the Flash object stored in the repository document with the Flash_1 identifier into the FlashBoxNet1 component.
See also: