Hi,
I have a SWf embed in a PDF and I am trying to load and save the state of the SWF at opening and closing the acrobat reader. The following code does not work... It doesn't save the state and fails to load the text field inputs. Why? :)
Also the variable "result" is everytime null.
Sorry, since HMTL tags are not allowed, I had to replaced the tags bei a "-". ;-)
... applicationComplete="loadInput()" ...
...
public function saveInput():void
{
var theXML:XML =
-inputForm-
-name-{nameInput.text}-/name-
-firstName-{firstNameInput.text}-/firstName-
-age-{ageInput.text}-/age-
-/inputForm-;
var result:Object = ExternalInterface.call("multimedia_saveSettingsString", theXML.toXMLString());
}
public function loadInput():void
{
var result:Object = ExternalInterface.call("multimedia_loadSettingsString");
if (result)
{
debug.text = "test";
var resultXML:XML = new XML(result.toString());
nameInput.text = resultXML.name.toString();
firstNameInput.text = resultXML.firstName.toString();
ageInput.text = resultXML.age.toString();
}
}
...
-mx:Form-
-mx:FormItem label="Name:"-
-mx:TextInput id="nameInput" change="saveInput()"/-
-/mx:FormItem-
-mx:FormItem label="First Name:"-
-mx:TextInput id="firstNameInput" change="saveInput()"/-
-/mx:FormItem-
-mx:FormItem label="Age:"-
-mx:TextInput id="ageInput" change="saveInput()"/-
-/mx:FormItem-
-/mx:Form-
...