|
Datafile Reloading
In normal use, LiveWire loads your datafile at startup, and this defines the styles, behavior and links shown by the applet. The Datafile Reloading feature makes it possible to tell LiveWire to restart using a different datafile in compatible browsers.. You might want to do this to display a different collection of links.You can use this feature in two ways: either by using a link in the menu (so that the new datafile is loaded when the user clicks the menu item) or using JavaScript.
Using a Link in the Menu
You can use a menu item's URL parameter to open a datafile instead of opening a web link. The URL parameter should look like this:
URL3=datafile(mydatafile.inf)If the user clicks this link, the applet will load the datafile named "mydatafile.inf". It's important that the word datafile is lowercase, and there must be no spaces or quote symbols in the line. You can use an absolute or relative URL for the datafile name. If you use a relative URL, note that the location of the datafile is relative to the location of the SWF file (not the location of the web page).
Using JavaScript
You can also use JavaScript to force the applet to load a different datafile. This could be in response to a click on an ordinary HTML link, or to some other scripting event. To use this method, set the applet's newdatafile variable to the location of the datafile, as in this example function:
function loadDataFile(d)If you changed the name 'LiveWire' in your HTML code, change the instances in the script code above so they match the new name you chose. You can use an absolute or relative URL for the datafile name. If you use a relative URL, note that the location of the datafile is relative to the location of the SWF file (not the location of the web page).
|