About This File
This is a modders resource that attempts to make it easy for other mod authors to show a custom SWF temporarily in the UI. This is not intended to be used for widgets. It is designed more for showing custom player status updates, mod title graphics, warnings, achievement graphics, etc.
Usage
Your mod will need to set up a connection to ImmersiveSWF and then call the "showSWF" function in order to display your custom SWF file.
Here is an example of how the connection and function call work:
Quest ImmersiveSWF = Game.GetFormFromFile(0x01000F99, "ImmersiveSWF.esp") as Quest ;Create a reference to ImmersiveSWF.ScriptObject ImmersiveSWFQuestScript = ImmersiveSWF.CastAs("ImmersiveSWF:ImmersiveSWFQuestScript") ;Create a reference to the script we need.; Check to see if the ImmersiveSWF mod was found, if so, run the showSWF function, requesting the SWF id "test".If ImmersiveSWFQuestScript Var[] params = new Var[1] params[0] = "test" ImmersiveSWFQuestScript.CallFunction("showSWF", params)Endif
The above example attempts to show a SWF with the id "test". To use this mod, you will need to list your own SWF files with their own unique id names in your own XML file. It's easy.
Here is an example XML file:
<meta title="ISWF_sample_data.xml" version="1.0"/><defaults scale="100" duration="5" swfLocation="TOP_LEFT" swfWidth="124" swfHeight="32" margin="0" monochrome="TRUE"/><swf id="showISWFBanner" swf="ISWF_banner.swf"/><swf id="test" swfLocation="CENTER" swf="ISWF_banner.swf"/>
The meta node simply lists information about your SWF list. It is not required.
The defaults node lists the parameters the mod will use if you do not define the parameters per SWF. This is for convenience so that you don't have to repeatedly write 'duration="5"' for every SWF if you know that you want all of your SWF files to show for 5 seconds when called.
The swf nodes are where you list your id names and SWF file names. The id name is the reference you use to call a specific SWF with "showSWF" like the example above. The swf parameter is the name of your custom SWF file. You can add more swf nodes to reference all of your custom SWF files.
As you can see in the "test" swf node, parameters like "swfLocation" can be included in the swf node to over-ride the default parameters.
The various parameters available:
IMPORTANT: Your XML file and SWF files need to be placed in a folder titled "ImmersiveSWF" within the "Data" folder. The mod can load multiple lists from multiple different mods unless there is a naming conflict. So, please use unique identifiers/naming for your SWF files, XML and SWF id names.
Credits
Thanks out to the F4SE team!