SetVariable(Name: String; Value: String);
Name. Name of the variable, which value must be set.
Value. It is a value that should be set.
The SetVariable method sets value of the specified variable that is used inside the Flash object.
To display the Flash map on the form, place the FlashBox component and determine parameters of the map using the Movie property and the SetVariable method, for example, describing the OnShow event for the form:
Sub MyFormOnShow(Sender: Object; Args: IEventArgs);
Begin
FlashBox1.Movie := "c:\temp\FlashMapEngine.swf";
FlashBox1.SetVariable("topBase", "tb_russia2.swf");
FlashBox1.SetVariable("dataURL", "tb_russia2_3.xml");
FlashBox1.SetVariable("msImage0", "C:\temp\ms_01.swf");
End Sub MyFormOnShow;
The paths to the topobase (topBase), file (msImage0) and xml file (dataURL) are calculated from the physical location of the FlashMapEngine.swf file:
Absolute of the kind:
c:/temp/tb_world1_1.xml
Relative of the kind:
./tb_world1_1.xml
../temp/tb_world1_1.xml
See also: