
Flash Player 7 + TheSpringBox V1
Widget.setParameter(value:Object) : Void;
value - The object the will be stored as the widget paramter.
Nothing.
Method; used to store the current parameter of a widget instance. This is not to be confused with the Widget.setMemory method, which stores global data on the client for all instances of your widget to share. The Widget.setParamter method on the other hand stores data specific to a particular widget instance. Typically this is the same parameter which is passed into the widget when it is launced with a pop action from the web.
It is important to always update the parameter when there is a state change in the widget, because TheSpringBox recordes all widget positions and parameters when it is closed. If you do not update or set the parameter, you will not be able to correctly display widgets that are opened on startup of the application. The reason you do not want to use the Widget.setMemory to do this is because multiple instances of your widget my be set to different parameters when the application closes.
The function in this example will load an XML file from a URL and store the URL as the current instance parameter.
function loadFeed(url:String) {
myXML.load(url);
var parameter:Object = Widget.getParameter();
parameter.url = url;
Widget.setParameter(parameter);
};
Widget.getParameter()