套件 | 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, 03:47 PM Z