
Flash Player 7 + TheSpringBox 1.1.5
Widget.onMemoryUpdate = function(isTrigger:Boolean) : Void {
// your statements here
}
isTrigger - A Boolean value set to true when this instance of the widget was the one that updated the memory, false when it was not.
Nothing.
Event handler; invoked when Widget.setMemory() is called. the event is broadcast to all open instances of a particular widget. You may respond to this handler by refreshing your interface to display the most up to date data from the memory using Widget.getMemory().
Create a Widget with a text field txtDebug and a Button btnWrite. Open multiple instances of the widget; the instance on which the button was clicked will display the text from the if part, the others will display the text from the else part.
Widget.onMemoryUpdate = function(isTrigger:Boolean) {
if(isTrigger)
{
txtDebug.text = "I changed the memory.";
}else{
txtDebug.text = "I didn't change the memory.";
}
};
btnWrite.onRelease = function()
{
Widget.setMemory({test:"test"});
};
Widget.getMemory(), Widget.setMemory()