ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
com.adobe.icomm.assetplacement.model 

Resource  - AS3 Asset Placement

Packagecom.adobe.icomm.assetplacement.model
Classpublic class Resource
InheritanceResource Inheritance PackageElement Inheritance Object

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

This class models a <resource> element in the package definition. It provides helper methods for getting and setting the most common attributes of the <resource> element.



Public Properties
 PropertyDefined By
  altText : String
[read-only] Alternative text (alt text) is used as a replacement for an image, whenever the image cannot be seen.
Resource
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  contentType : String
[read-only] Identifies the content type of the the current resource.
Resource
  controller : String
[read-only] Contains a reference to a controller element using an XML id.
Resource
  expiration : String
[read-only] Specifies the expiration date of a given resource.
Resource
 Inheritednamespace : String
[read-only] The namespace for this element.
PackageElement
  source : String
[read-only] Specifies a reference to an external file resource.
Resource
  targetURL : String
[read-only] Specifies a reference to an external web page.
Resource
 Inheritedxml : XML
The XML this object represents.
PackageElement
Public Methods
 MethodDefined By
  
Constructor.
Resource
 Inherited
Retrieve an attribute of this element.
PackageElement
 Inherited
Retrieve a child value of this element.
PackageElement
 Inherited
Retrieve an attribute of this element's parent.
PackageElement
 Inherited
Indicates whether an object has a specified property defined.
Object
  
Using the expiration attribute specified on the resource, this function calculates whether the resource is expired based on the current date.
Resource
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

altText

property
altText:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Alternative text (alt text) is used as a replacement for an image, whenever the image cannot be seen. Every visible image should have alt text, unless the image is purely decorative, that is, it has no function and is used only for visual formatting or decoration. This text will also be used by screen readers.



Implementation
    public function get altText():String

contentType

property 
contentType:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Identifies the content type of the the current resource.



Implementation
    public function get contentType():String

controller

property 
controller:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Contains a reference to a controller element using an XML id. The controller element is the one that references this Resource at runtime.



Implementation
    public function get controller():String

expiration

property 
expiration:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Specifies the expiration date of a given resource. This date must be specified as YYYY-MM-DD. For example, 2009-12-12.



Implementation
    public function get expiration():String

source

property 
source:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Specifies a reference to an external file resource. The set of supported URI schemes (e.g., http, ftp, repository, file) is implementation-defined.



Implementation
    public function get source():String

targetURL

property 
targetURL:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Specifies a reference to an external web page.



Implementation
    public function get targetURL():String
Constructor Detail

Resource

()Constructor
public function Resource()

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Constructor.

Method Detail

isExpired

()method
public function isExpired():Boolean

Language Version: ActionScript 3.0
Product Version: Asset Placement Building Block 9.5
Runtime Versions: AIR 1.0, Flash Player 9, Flash Player 10

Using the expiration attribute specified on the resource, this function calculates whether the resource is expired based on the current date.

Returns
Boolean — True if the expiration data has passed as of the time of calling this function and false otherwise