Packagecom.gaiaframework.api
Interfacepublic interface INetStream extends IAsset, flash.events.IEventDispatcher

This is the interface for the NetStreamAsset.

See also

NetStreamAsset Documentation
flash.net.NetStream


Public Properties
 PropertyDefined by
  bufferLength : Number
[read-only]
INetStream
  bufferTime : Number
INetStream
 Inheritedbytes : int
Returns the bytes attribute value set in the site.xml for byte-accurate preloading.
IAsset
  bytesLoaded : int
[read-only]
INetStream
  bytesTotal : int
[read-only]
INetStream
  client : Object
INetStream
  currentFPS : Number
[read-only]
INetStream
  duration : Number
[read-only] Returns the duration of the NetStream.
INetStream
 Inheritedid : String
Returns the ID as set in site.xml.
IAsset
  metaData : Object
[read-only] Returns the metaData of the NetStream.
INetStream
 Inheritednode : XML
Returns the raw XML node of the asset
IAsset
  ns : NetStream
[read-only] Returns the reference to the NetStream
INetStream
 Inheritedorder : int
Returns the load order and position of the asset relative to other assets of the page.
IAsset
  pan : Number
Specifies the pan of the NetStream.
INetStream
 InheritedpercentLoaded : Number
Returns the bytesLoaded / bytesTotal.
IAsset
 InheritedpreloadAsset : Boolean
Specifies a value of true if the asset is set to preload, or false if it is on-demand.
IAsset
 InheritedshowProgress : Boolean
Specifies whether the asset will cause the asset preloader to appear when loaded on-demand.
IAsset
  soundTransform : SoundTransform
INetStream
 Inheritedsrc : String
Returns the source path of the asset.
IAsset
  time : Number
[read-only]
INetStream
 Inheritedtitle : String
Specifies the title of the asset.
IAsset
  volume : Number
Specifies the volume of the NetStream.
INetStream
Public Methods
 MethodDefined by
 Inherited
abort():void
Used to manually abort an on-demand asset load.
IAsset
  
attach(video:Video):void
Attach the NetStreamAsset to a Video instance.
INetStream
  
close():void
INetStream
  
fadeTo(volume:Number, duration:Number, onComplete:Function = null):void
Adjust the volume over time to a particular value.
INetStream
 Inherited
Returns the loaded bytes of the file.
IAsset
 Inherited
Returns the total bytes of the file.
IAsset
 Inherited
load(... args):void
Used to load assets on-demand.
IAsset
  
panTo(pan:Number, duration:Number, onComplete:Function = null):void
Adjust the pan over time to a particular value.
INetStream
  
pause():void
INetStream
  
play(start:Number = -2, len:Number = -1):void
INetStream
  
resume():void
INetStream
  
seek(offset:Number):void
INetStream
Events
 EventSummaryDefined by
 Inherited Dispatched when the asset is finished loading.IAsset
   Dispatched when the NetStream's fires an AsyncErrorEvent INetStream
   Dispatched when the NetStream's onCuePoint event is received INetStream
   Dispatched when the NetStream's onImageData event is received INetStream
   Dispatched when the NetStream's onMetaData event is received INetStream
   Dispatched when a NetStream object is reporting its status or error condition.INetStream
   Dispatched when the NetStream's onTextData event is received INetStream
   Dispatched when the NetStream's onXMPData event is received INetStream
Property detail
bufferLengthproperty
bufferLength:Number  [read-only]

Implementation
    public function get bufferLength():Number

See also

bufferTimeproperty 
bufferTime:Number  [read-write]

Implementation
    public function get bufferTime():Number
    public function set bufferTime(value:Number):void

See also

bytesLoadedproperty 
bytesLoaded:int  [read-only]

Implementation
    public function get bytesLoaded():int

See also

bytesTotalproperty 
bytesTotal:int  [read-only]

Implementation
    public function get bytesTotal():int

See also

clientproperty 
client:Object  [read-write]

Implementation
    public function get client():Object
    public function set client(value:Object):void

See also

currentFPSproperty 
currentFPS:Number  [read-only]

Implementation
    public function get currentFPS():Number

See also

durationproperty 
duration:Number  [read-only]

Returns the duration of the NetStream. Available after the meteData is loaded.

Implementation
    public function get duration():Number
metaDataproperty 
metaData:Object  [read-only]

Returns the metaData of the NetStream. Available after the metaData is loaded.

Implementation
    public function get metaData():Object
nsproperty 
ns:NetStream  [read-only]

Returns the reference to the NetStream

Implementation
    public function get ns():NetStream
panproperty 
pan:Number  [read-write]

Specifies the pan of the NetStream.

Implementation
    public function get pan():Number
    public function set pan(value:Number):void
soundTransformproperty 
soundTransform:SoundTransform  [read-write]

Implementation
    public function get soundTransform():SoundTransform
    public function set soundTransform(value:SoundTransform):void

See also

timeproperty 
time:Number  [read-only]

Implementation
    public function get time():Number

See also

volumeproperty 
volume:Number  [read-write]

Specifies the volume of the NetStream.

Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Method detail
attach()method
public function attach(video:Video):void

Attach the NetStreamAsset to a Video instance. A convenience method for Video.attachNetStream(NetStreamAsset.ns);

Parameters
video:Video — A reference to a flash.media.Video instance

See also

close()method 
public function close():void

See also

fadeTo()method 
public function fadeTo(volume:Number, duration:Number, onComplete:Function = null):void

Adjust the volume over time to a particular value.

Parameters
volume:Number — A value between 0 and 1.
 
duration:Number — The duration of the fade in seconds.
 
onComplete:Function (default = null) — The callback function to call when the fade is complete
panTo()method 
public function panTo(pan:Number, duration:Number, onComplete:Function = null):void

Adjust the pan over time to a particular value.

Parameters
pan:Number — A value between -1 and 1.
 
duration:Number — The duration of the pan in seconds.
 
onComplete:Function (default = null) — The callback function to call when the pan is complete
pause()method 
public function pause():void

See also

play()method 
public function play(start:Number = -2, len:Number = -1):void

Parameters
start:Number (default = -2)
 
len:Number (default = -1)

See also

resume()method 
public function resume():void

See also

seek()method 
public function seek(offset:Number):void

Parameters
offset:Number

See also

Event detail
asyncErrorevent 
Event object type: flash.events.AsyncErrorEvent

Dispatched when the NetStream's fires an AsyncErrorEvent

See also

cuePointevent  
Event object type: com.gaiaframework.events.NetStreamAssetEvent

Dispatched when the NetStream's onCuePoint event is received

imageDataevent  
Event object type: com.gaiaframework.events.NetStreamAssetEvent

Dispatched when the NetStream's onImageData event is received

metaDataevent  
Event object type: com.gaiaframework.events.NetStreamAssetEvent

Dispatched when the NetStream's onMetaData event is received

netStatusevent  
Event object type: flash.events.NetStatusEvent

Dispatched when a NetStream object is reporting its status or error condition.

See also

textDataevent  
Event object type: com.gaiaframework.events.NetStreamAssetEvent

Dispatched when the NetStream's onTextData event is received

xmpDataevent  
Event object type: com.gaiaframework.events.NetStreamAssetEvent

Dispatched when the NetStream's onXMPData event is received