ActionScript® 3.0 Referenzhandbuch für die Adobe® Flash®-Plattform
Home  |  Liste der Pakete und Klassen ausblenden |  Pakete  |  Klassen  |  Neue Funktionen  |  Stichwortverzeichnis  |  Anhänge  |  Warum auf Englisch?
Filter: Daten werden vom Server abgerufen...
Daten werden vom Server abgerufen...
com.adobe.icomm.assetplacement.model 

PackageDefinition  - AS3 Asset Placement

Paketcom.adobe.icomm.assetplacement.model
Klassepublic class PackageDefinition
VererbungPackageDefinition Inheritance Object

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A PackageDefinition is an object that wraps the package definition XML file (package.xml). This class is responsible for loading the XML from the package definition file.

The package definition is divided into two broad sections: <controllers> and <assets>. The <controllers> section contains entries for each AssetPlacement component used in the statement: each PromoImage, PromoImageSlideShow, AttachmentLoader, etc. that is added to the statement will have a <controller> entry automatically added to the package definition file by the Interactive Document Plugin. The <controller> entries are meant to be used later in the statement development cycle, to help choose appropriate advertising content to place in each component.

The <assets> section is used at runtime. Each AssetPlacement component will attempt to load assets at runtime. A component looks up the <resource> or <attachment> entry with the matching controller attribute to the components' id attribute and if a match is found attempts to load the source specified.

It is possible to access the various assets of the package definition by calling the appropriate methods; assets are divided into two types: attachments and resources. Attachments are assets that are part of the PDF Navigator and must be accessed through Navigator APIs. Resources are content that can be loaded directly such as images and SWFs. Generally, an asset is recovered through its controller id. The controller id is the key that connects a Flex component (such as a PromoImage) to a resource in the package definition. The component's id property is the lookup key. Note that many assets may be returned for one ID lookup.

This class is a singleton. Calls to the constructor will result in an exception being thrown. In order to use this class, use the PackageDefinitionLoader class.

Verwandte API-Elemente



Öffentliche Eigenschaften
 EigenschaftDefiniert von
  attachments : IList
[schreibgeschützt] A list that contains all of <attachment> entries in the package definition, wrapped in Attachment objects.
PackageDefinition
 Inheritedconstructor : Object
Ein Verweis auf das Klassenobjekt oder die Konstruktorfunktion für eine angegebene Objektinstanz.
Object
  controllers : IList
[schreibgeschützt] A list that contains all of <controllers> entries in the package definition, wrapped in Controller objects.
PackageDefinition
  packageDefinitionFile : String
[statisch] [schreibgeschützt] The file path of the package definition file that underlies this object.
PackageDefinition
  packageLoaded : Boolean
[schreibgeschützt] Check to see if the package is loaded.
PackageDefinition
  resources : IList
[schreibgeschützt] A list that contains all of the <resource> (non expired) entries in the package definition, wrapped in Resource objects.
PackageDefinition
Öffentliche Methoden
 MethodeDefiniert von
  
Creates a PackageDefinition object.
PackageDefinition
  
Return a list that contains all of the expired <resource> entries in the package definition, wrapped in Resource objects.
PackageDefinition
  
A convenience method that searches through the attachments and returns a list containing only the attachments that match the given id.
PackageDefinition
  
A convenience method that searches through the contollers and returns the controller with the matching id and XML namespace.
PackageDefinition
  
getResourcesByControllerId(id:String, includeExpired:Boolean = false):IList
A convenience method that searches through the resources and returns a list containing only the resources that match the given id.
PackageDefinition
  
The PackageDefinition version.
PackageDefinition
 Inherited
Gibt an, ob für ein Objekt eine bestimmte Eigenschaft definiert wurde.
Object
 Inherited
Gibt an, ob eine Instanz der Object-Klasse in der Prototypkette des Objekts vorhanden ist, das als Parameter angegeben wurde.
Object
  
Broadcast an IPackageObjectReadyEvent.
PackageDefinition
 Inherited
Gibt an, ob die angegebene Eigenschaft vorhanden ist und durchlaufen werden kann.
Object
 Inherited
Legt die Verfügbarkeit einer dynamischen Eigenschaft für Schleifenoperationen fest.
Object
 Inherited
Gibt die Stringdarstellung dieses Objekts zurück, formatiert entsprechend den Konventionen des Gebietsschemas.
Object
 Inherited
Gibt das angegebene Objekt als String zurück.
Object
 Inherited
Gibt den Grundwert des angegebenen Objekts zurück.
Object
Öffentliche Konstanten
 KonstanteDefiniert von
  PACKAGE_VERSION_1_0 : Number = 1.0
[statisch] The package version 1.0.
PackageDefinition
  PACKAGE_VERSION_2_0 : Number = 2.0
[statisch] The package version 2.0.
PackageDefinition
Eigenschaftendetails

attachments

Eigenschaft
attachments:IList  [schreibgeschützt]

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A list that contains all of <attachment> entries in the package definition, wrapped in Attachment objects.



Implementierung
    public function get attachments():IList

Verwandte API-Elemente

controllers

Eigenschaft 
controllers:IList  [schreibgeschützt]

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A list that contains all of <controllers> entries in the package definition, wrapped in Controller objects.



Implementierung
    public function get controllers():IList

Verwandte API-Elemente

packageDefinitionFile

Eigenschaft 
packageDefinitionFile:String  [schreibgeschützt]

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

The file path of the package definition file that underlies this object.



Implementierung
    public static function get packageDefinitionFile():String

packageLoaded

Eigenschaft 
packageLoaded:Boolean  [schreibgeschützt]

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

Check to see if the package is loaded.



Implementierung
    public function get packageLoaded():Boolean

resources

Eigenschaft 
resources:IList  [schreibgeschützt]

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A list that contains all of the <resource> (non expired) entries in the package definition, wrapped in Resource objects.



Implementierung
    public function get resources():IList

Verwandte API-Elemente

Konstruktordetails

PackageDefinition

()Konstruktor
public function PackageDefinition()

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

Creates a PackageDefinition object. The PackageDefinition is meant to be a singleton object - there is only one package definition that wraps the XML package definition file. Callers should not invoke the constructor, which will throw an error. Rather, use the PackageDefinitionLoader class.

Verwandte API-Elemente

Methodendetails

expiredResources

()Methode
public function expiredResources():IList

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

Return a list that contains all of the expired <resource> entries in the package definition, wrapped in Resource objects.

Rückgabewerte
IList — A list of all the expired <resource> entries in the package definition, wrapped in Resource objects.

Verwandte API-Elemente

getAttachmentsByControllerId

()Methode 
public function getAttachmentsByControllerId(id:String):IList

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A convenience method that searches through the attachments and returns a list containing only the attachments that match the given id. The id is usually the id property of a component such as a PromoImage. The key it is looking up corresponds to the controller attribute on the <attachment>'s parent <attachments> node.

Parameter

id:String — The id of a component, such as a PromoImage.

Rückgabewerte
IList — A list of Attachment objects who's controller ID match the given id.

Verwandte API-Elemente

getControllerById

()Methode 
public function getControllerById(id:String, ns:String = null):Controller

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A convenience method that searches through the contollers and returns the controller with the matching id and XML namespace.

Parameter

id:String — The id of a controller. This id should match an MXML id in the project as well as a controller id in the <assets> section of the package definition.
 
ns:String (default = null) — The XML namespace of a controller. If null the first controller with the matching the id will be returned.

Rückgabewerte
Controller — The Controller object that matches this id and XML namespace or null if there is no matching controller.

Verwandte API-Elemente

getResourcesByControllerId

()Methode 
public function getResourcesByControllerId(id:String, includeExpired:Boolean = false):IList

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

A convenience method that searches through the resources and returns a list containing only the resources that match the given id. The caller indicates whether to include expired resources via the includeExpired parameter. The id is usually the id property of a component such as a PromoImage. The key it is looking up corresponds to the controller attribute on the <resource>'s parent <resources> node.

Parameter

id:String — The id of a component, such as a PromoImage.
 
includeExpired:Boolean (default = false) — Boolean whether to include expired resources in the returned list.

Rückgabewerte
IList — A list of Resource objects who's controller ID match the given id.

Verwandte API-Elemente

getVersion

()Methode 
public function getVersion():Number

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 10
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

The PackageDefinition version.

Rückgabewerte
Number — The package definition version.

packageObjectReady

()Methode 
public function packageObjectReady(packageObject:IPackageObject):void

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 9.5
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

Broadcast an IPackageObjectReadyEvent. When an IPackageObject is ready to be used, it asks the package definition to brodcast the PackageObjectReadyEvent. This allows the hosting application to be notified anytime a new statement object is created.

Parameter

packageObject:IPackageObject — An IPackageObject that is loaded and ready to be used.

Verwandte API-Elemente

Konstantendetails

PACKAGE_VERSION_1_0

Konstante
public static const PACKAGE_VERSION_1_0:Number = 1.0

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 10
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

The package version 1.0.

PACKAGE_VERSION_2_0

Konstante 
public static const PACKAGE_VERSION_2_0:Number = 2.0

Sprachversion: ActionScript 3.0
Produktversion: Baustein „Asset Placement“ 10
Laufzeitversionen: AIR 1.0, Flash Player 9, Flash Player 10

The package version 2.0.





[ X ]Warum auf Englisch?
Inhalt des ActionScript 3.0-Referenzhandbuchs wird in englischer Sprache angezeigt

Nicht alle Teile des ActionScript 3.0-Referenzhandbuchs wurden in alle Sprachen übersetzt. Wenn der Text zu einem Sprachelement nicht übersetzt wurde, wird er auf Englisch angezeigt. Zum Beispiel wurden die Informationen zur ga.controls.HelpBox-Klasse nicht in andere Sprachen übersetzt. In der deutschen Version des Referenzhandbuchs erscheint der Abschnitt zur ga.controls.HelpBox-Klasse deshalb auf Englisch.