Package | com.adobe.icomm.assetplacement.data |
Class | public class XFADataStream |
Inheritance | XFADataStream EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 10 |
NavigatorHostInstance.initialize(hostValue);
Related API Elements
com.adobe.portfolio.api.INavigatorHost
Otherwise any calls to read or write to the datasets packet will throw an exception.
Method | Defined By | ||
---|---|---|---|
Constructor
| XFADataStream | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Asynch call to read the xfadata set xml stream from Acrobat. | XFADataStream | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher | ||
Asynch call to save the given XML into the xfadata set stream within Acrobat. | XFADataStream |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when the xfadataset xml fails to load | XFADataStream | |||
Dispatched when the xfadataset xml is available after calling readXML() | XFADataStream | |||
Dispatched when the xfadataset xml has finished saving after a call to saveData(xml) | XFADataStream | |||
Dispatched when the xfadataset xml has failed to save after a call to saveXML(xml) | XFADataStream |
XFADataStream | () | Constructor |
public function XFADataStream()
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
Constructor
readXML | () | method |
public function readXML():void
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 10 |
Asynch call to read the xfadata set xml stream from Acrobat. Caller should register for xfaDataReady event as well as xfaDataLoadFailed event. Calling this function before setting NavigatorHostInstance.value throws an error.
writeXML | () | method |
public function writeXML(xml:XML):void
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 10 |
Asynch call to save the given XML into the xfadata set stream within Acrobat. Caller should register for xfaDataSaved and xfaDataSaveFailed events to determine the outcome. The xml passed in must be non-null, otherwise an Error is thrown. Calling this function before setting NavigatorHostInstance.value throws an error.
Parameters
xml:XML |
xfaDataLoadFailed | Event |
com.adobe.icomm.assetplacement.data.XFADataLoadFailedEvent
property XFADataLoadFailedEvent.type =
com.adobe.icomm.assetplacement.data.XFADataLoadedEvent.XFA_DATA_LOADFAILED
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 10 |
Dispatched when the xfadataset xml fails to load
xfaDataReady | Event |
com.adobe.icomm.assetplacement.data.XFADataReadyEvent
property XFADataReadyEvent.type =
com.adobe.icomm.assetplacement.data.XFADataLoadedEvent.XFA_DATA_LOADED
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 10 |
Dispatched when the xfadataset xml is available after calling readXML()
xfaDataSaved | Event |
com.adobe.icomm.assetplacement.data.XFADataSavedEvent
property XFADataSavedEvent.type =
com.adobe.icomm.assetplacement.data.XFADataSavedEvent.XFA_DATA_SAVED
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 10 |
Dispatched when the xfadataset xml has finished saving after a call to saveData(xml)
xfaDataSaveFailed | Event |
com.adobe.icomm.assetplacement.data.XFADataSaveFailedEvent
property XFADataSaveFailedEvent.type =
com.adobe.icomm.assetplacement.data.XFADataSaveFailedEvent.XFA_DATA_SAVEFAILED
Language Version: | ActionScript 3.0 |
Product Version: | Asset Placement Building Block 10 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Player 10 |
Dispatched when the xfadataset xml has failed to save after a call to saveXML(xml)
private xfaStream:XFADataStream = new XFADataStream(); public function set host(value:INavigatorHost):void { if(value) { // //Initialize the navigator. // //Set the host instance to allow centralized access NavigatorHostInstance.initialize(value); //Add handlers for read/write xfaStream.addEventListener(XFADataReadyEvent.XFA_DATA_READY, onXFADataReady); xfaStream.addEventListener(XFADataLoadFailedEvent.XFA_DATA_LOADFAILED, onXFADataLoadFailed); xfaStream.addEventListener(XFADataSavedEvent.XFA_DATA_SAVED, onXFADataSaved); xfaStream.addEventListener(XFADataSaveFailedEvent.XFA_DATA_SAVEFAILED, onXFADataSaveFailed); } else { // //Shutdown the navigator // NavigatorHostInstance.release(); //other cleanup ... } } public function readData() : void { try { xfaStream.readXML(); } catch(e:Error) { //UNEXPECTED ERROR } } public function writeData(newXML:XML) : void { try { xfaStream.writeXML(xml); } catch(e:Error) { //UNEXPECTED ERROR } } //event handler for when xfa data successfully loaded via XFADataStream private function onXFADataReady(event:XFADataReadyEvent) : void { //The xfa data loaded successfully var info:XML = event.data; } //event handler for when xfa data fails to load via XFADataStream private function onXFADataLoadFailed(event:XFADataLoadFailedEvent) : void { //Failed to load data. See event.error } //event handler for when xfa data successfully saved via XFADataStream private function onXFADataSaved(event:XFADataSavedEvent) : void { //The xfa data was saved successfully"); } //event handler for when xfa data fails to save via XFADataStream private function onXFADataSaveFailed(event:XFADataSaveFailedEvent) : void { //Failure to save data. See event.error }
Thu Dec 6 2018, 01:12 PM -08:00