Packagejp.progression.data
Classpublic class Resource
ImplementsIIdGroup, jp.progression.core.impls.IDisposable

Resource クラスは、汎用的なリソース管理機能を提供します。


Example
  // Resource インスタンスを作成する
  var res:Resource = new Resource();
  

See also

jp.progression.data.getResourceById()
jp.progression.data.getResourcesByGroup()


Public Properties
 PropertyDefined by
  bytes : ByteArray
保持している ByteArray 形式のデータを取得または設定します。
Resource
  bytesTotal : uint
読み込まれたデータの総ファイルサイズを取得または設定します。
Resource
  data : *
保持しているデータを取得または設定します。
Resource
  group : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the Resource.
Resource
  id : String
インスタンスを表すユニークな識別子を取得または設定します。
Resource
Public Methods
 MethodDefined by
  
Resource(id:String, data:ByteArray, bytes:uint = null, bytesTotal:Object = 0, initObject:* = null)
新しい Resource インスタンスを作成します。 Creates a new Resource object.
Resource
  
dispose():void
保持しているデータを解放します。
Resource
  
toBitmapData():BitmapData
指定されたオブジェクトの BitmapData 表現を返します。 Returns the BitmapData representation of the specified object.
Resource
  
toByteArray():ByteArray
指定されたオブジェクトの BitmapData 表現を返します。 Returns the BitmapData representation of the specified object.
Resource
  
toLoader():Loader
指定されたオブジェクトの Loader 表現を返します。 Returns the Loader representation of the specified object.
Resource
  
toSound():Sound
指定されたオブジェクトの Sound 表現を返します。 Returns the Sound representation of the specified object.
Resource
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
Resource
  
toXML():XML
指定されたオブジェクトの XML 表現を返します。 Returns the XML representation of the specified object.
Resource
Property detail
bytesproperty
bytes:ByteArray  [read-write]

保持している ByteArray 形式のデータを取得または設定します。

Implementation
    public function get bytes():ByteArray
    public function set bytes(value:ByteArray):void
bytesTotalproperty 
bytesTotal:uint  [read-write]

読み込まれたデータの総ファイルサイズを取得または設定します。

Implementation
    public function get bytesTotal():uint
    public function set bytesTotal(value:uint):void
dataproperty 
data:*  [read-write]

保持しているデータを取得または設定します。

Implementation
    public function get data():*
    public function set data(value:*):void
groupproperty 
group:String  [read-write]

インスタンスのグループ名を取得または設定します。 Indicates the instance group of the Resource.

Implementation
    public function get group():String
    public function set group(value:String):void

See also

jp.progression.resources.getResourcesByGroup()
idproperty 
id:String  [read-write]

インスタンスを表すユニークな識別子を取得または設定します。

Implementation
    public function get id():String
    public function set id(value:String):void

See also

jp.progression.resources.getResourceByUrl()
Constructor detail
Resource()constructor
public function Resource(id:String, data:ByteArray, bytes:uint = null, bytesTotal:Object = 0, initObject:* = null)

新しい Resource インスタンスを作成します。 Creates a new Resource object.

Parameters
id:Stringインスタンスを表すユニークな識別子です。
 
data:ByteArray保持したいデータです。
 
bytes:uint (default = null)保持したい ByteArray 形式のデータです。
 
bytesTotal:Object (default = 0)読み込まれたデータの総ファイルサイズです。
 
initObject:* (default = null)設定したいプロパティを含んだオブジェクトです。
Method detail
dispose()method
public function dispose():void

保持しているデータを解放します。

toBitmapData()method 
public function toBitmapData():BitmapData

指定されたオブジェクトの BitmapData 表現を返します。 Returns the BitmapData representation of the specified object.

Returns
BitmapDataオブジェクトの BitmapData 表現です。 A BitmapData representation of the object.
toByteArray()method 
public function toByteArray():ByteArray

指定されたオブジェクトの BitmapData 表現を返します。 Returns the BitmapData representation of the specified object.

Returns
ByteArrayオブジェクトの BitmapData 表現です。 A BitmapData representation of the object.
toLoader()method 
public function toLoader():Loader

指定されたオブジェクトの Loader 表現を返します。 Returns the Loader representation of the specified object.

Returns
Loaderオブジェクトの Loader 表現です。 A Loader representation of the object.
toSound()method 
public function toSound():Sound

指定されたオブジェクトの Sound 表現を返します。 Returns the Sound representation of the specified object.

Returns
Soundオブジェクトの Sound 表現です。 A Sound representation of the object.
toString()method 
public function toString():String

指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.
toXML()method 
public function toXML():XML

指定されたオブジェクトの XML 表現を返します。 Returns the XML representation of the specified object.

Returns
XMLオブジェクトの XML 表現です。 A XML representation of the object.