Paket | com.adobe.icomm.assetplacement.controller |
Klass | public class XMLDataLoader |
Arv | XMLDataLoader EventDispatcher Object |
Implementerar | IMXMLObject, IPackageObject |
Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
id
.
If autoLoad
is true, then whenever the id
property is changed, the data linked
to the new id will be loaded. If autoLoad
is false, then an explicit call to loadData() must
be made to load the package XML resource. Once the XML data is loaded and ready to use, an XmlDataReadyEvent
is dispatched.
Egenskap | Definieras med | ||
---|---|---|---|
autoLoad : Boolean
A flag that indictes whether content starts loading automatically when the id
is set or waits for a call to the loadData() method. | XMLDataLoader | ||
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
id : String
The id of this object, which is used to link up to the controller attribute
in the assets section of the package definition file. | XMLDataLoader | ||
packageAttachments : IList [skrivskyddad]
A list of Attachment objects who's controller id attribute matches the
id of this object. | XMLDataLoader | ||
packageController : Controller [skrivskyddad]
The controller object who's id matches the id of this object. | XMLDataLoader | ||
packageResource : Resource [skrivskyddad]
The current Resource object who's controller id attribute matches the
id of this object. | XMLDataLoader | ||
packageResources : IList [skrivskyddad]
A list of Resource objects who's controller id attribute matches the
id of this object. | XMLDataLoader |
Metod | Definieras med | ||
---|---|---|---|
XMLDataLoader(id:String = "")
Constructor. | XMLDataLoader | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
This method loads the XML data associated to the id property in the package
definition file. | XMLDataLoader | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when new content is loaded after calling loadData() or when changing the id property, if autoLoad is set to true. | XMLDataLoader |
autoLoad | egenskap |
autoLoad:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
A flag that indictes whether content starts loading automatically when the id
is set or waits for a call to the loadData()
method.
If true
, the content loads automatically.
If false
, you must call the loadData()
method.
Standardvärdet är true.
Implementering
public function get autoLoad():Boolean
public function set autoLoad(value:Boolean):void
id | egenskap |
id:String
Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
The id of this object, which is used to link up to the controller
attribute
in the assets section of the package definition file.
Implementering
public function get id():String
public function set id(value:String):void
packageAttachments | egenskap |
packageAttachments:IList
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
A list of Attachment
objects who's controller
id
attribute matches the
id
of this object.
Implementering
public function get packageAttachments():IList
packageController | egenskap |
packageController:Controller
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
The controller object who's id
matches the id
of this object.
Implementering
public function get packageController():Controller
packageResource | egenskap |
packageResource:Resource
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
The current Resource
object who's controller
id
attribute matches the
id
of this object.
Implementering
public function get packageResource():Resource
packageResources | egenskap |
packageResources:IList
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
A list of Resource
objects who's controller
id
attribute matches the
id
of this object.
Implementering
public function get packageResources():IList
XMLDataLoader | () | Konstruktor |
loadData | () | metod |
public function loadData():void
Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
This method loads the XML data associated to the id
property in the package
definition file. When the data is ready for use, an xmlDataReady event is dispatched. The event
contains the data.
Relaterade API-element
xmlDataReady | Händelse |
com.adobe.icomm.assetplacement.controller.XMLDataReadyEvent
egenskap XMLDataReadyEvent.type =
com.adobe.icomm.assetplacement.controller.XMLDataReadyEvent.XML_DATA_READY
Språkversion: | ActionScript 3.0 |
Produktversion: | Asset Placement Building Block 9.5 |
Körningsmiljöversioner: | AIR 1.0, Flash Player 9, Flash Player 10 |
Dispatched when new content is loaded after calling loadData()
or when changing the id
property, if autoLoad
is set to true.
public function foo():void { var xmlDataLoader:XMLDataLoader = new XMLDataLoader(); xmlDataLoader.autoLoad = false; xmlDataLoader.id = "data"; xmlDataLoader.addEventListener(XMLDataReadyEvent.XML_DATA_READY, xmlDataReadyHandler); xmlDataLoader.loadData(); } private function xmlDataReadyHandler(event:XMLDataReadyEvent):void { var root:XML = event.data; // Do stuff with the XML... }
The XMLDataLoader can also be used in MXML:
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ap="http://ns.adobe.com/livecycle/icomm/assetplacement"> <mx:Script> <![CDATA[ // Called when XMLDataLoader loads data private function onXMLDataReady(event:XMLDataReadyEvent):void { var info:XML = event.data; StatementDataText.data = info.PhoneBill; } ]]> </mx:Script> <ap:XMLDataLoader id="data" xmlDataReady="onXMLDataReady(event)"/> </mx:Module>
Tue Jun 12 2018, 01:40 PM Z