Package | com.adobe.icomm.assetplacement.data |
Class | public class XFADataStream |
Inheritance | XFADataStream ![]() ![]() |
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.INavigator
com.adobe.portfolio.api.INavigatorHost
Otherwise any calls to read or write to the datasets packet will throw an exception.
com.adobe.portfolio.api.INavigatorHost
Otherwise any calls to read or write to the datasets packet will throw an exception.
Public Properties
Public Methods
Method | Defined By | ||
---|---|---|---|
![]() | 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 | |
![]() |
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 |
Events
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 |
Constructor Detail
Method Detail
Event Detail
Examples How to use this example
This class can be used in ActionScript as follows:
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