包 | com.adobe.icomm.assetplacement.data |
类 | public class XFADataStream |
继承 | XFADataStream EventDispatcher Object |
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | AIR 1.0, Flash Player 10 |
NavigatorHostInstance.initialize(hostValue);
相关 API 元素
com.adobe.portfolio.api.INavigatorHost
Otherwise any calls to read or write to the datasets packet will throw an exception.
方法 | 由以下参数定义 | ||
---|---|---|---|
Constructor
| XFADataStream | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | EventDispatcher | ||
将事件调度到事件流中。 | EventDispatcher | ||
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。 | EventDispatcher | ||
表示对象是否已经定义了指定的属性。 | Object | ||
表示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | ||
表示指定的属性是否存在、是否可枚举。 | Object | ||
Asynch call to read the xfadata set xml stream from Acrobat. | XFADataStream | ||
从 EventDispatcher 对象中删除侦听器。 | EventDispatcher | ||
设置循环操作动态属性的可用性。 | Object | ||
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。 | Object | ||
返回指定对象的字符串表示形式。 | Object | ||
返回指定对象的原始值。 | Object | ||
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。 | EventDispatcher | ||
Asynch call to save the given XML into the xfadata set stream within Acrobat. | XFADataStream |
事件 | 摘要 | 由以下参数定义 | ||
---|---|---|---|---|
[广播事件] Flash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时将调度此事件。 | EventDispatcher | |||
[广播事件] Flash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时将调度此事件。 | 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 | () | 构造函数 |
public function XFADataStream()
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | AIR 1.0, Flash Player 9, Flash Player 10 |
Constructor
readXML | () | 方法 |
public function readXML():void
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | 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 | () | 方法 |
public function writeXML(xml:XML):void
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | 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.
参数
xml:XML |
xfaDataLoadFailed | 事件 |
com.adobe.icomm.assetplacement.data.XFADataLoadFailedEvent
属性 XFADataLoadFailedEvent.type =
com.adobe.icomm.assetplacement.data.XFADataLoadedEvent.XFA_DATA_LOADFAILED
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | AIR 1.0, Flash Player 10 |
Dispatched when the xfadataset xml fails to load
xfaDataReady | 事件 |
com.adobe.icomm.assetplacement.data.XFADataReadyEvent
属性 XFADataReadyEvent.type =
com.adobe.icomm.assetplacement.data.XFADataLoadedEvent.XFA_DATA_LOADED
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | AIR 1.0, Flash Player 10 |
Dispatched when the xfadataset xml is available after calling readXML()
xfaDataSaved | 事件 |
com.adobe.icomm.assetplacement.data.XFADataSavedEvent
属性 XFADataSavedEvent.type =
com.adobe.icomm.assetplacement.data.XFADataSavedEvent.XFA_DATA_SAVED
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | AIR 1.0, Flash Player 10 |
Dispatched when the xfadataset xml has finished saving after a call to saveData(xml)
xfaDataSaveFailed | 事件 |
com.adobe.icomm.assetplacement.data.XFADataSaveFailedEvent
属性 XFADataSaveFailedEvent.type =
com.adobe.icomm.assetplacement.data.XFADataSaveFailedEvent.XFA_DATA_SAVEFAILED
语言版本: | ActionScript 3.0 |
产品版本: | Asset Placement Building Block 10 |
运行时版本: | 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 }
Tue Jun 12 2018, 11:04 AM Z