SeiON: Actionscript 3 Sound Engine | All Packages | All Classes | Index | Frames No Frames |
SeionInstance

Package | com.SeiON.Core
Class | public class SeionInstance
Inheritance | SeionInstance Object
Implements | ISeionInstance
Subclasses | SeionClip, SeionExample, SeionPitch, SeionSample

The base class that all sound-playing Seion classes must inherit. Treat this like an Abstract class. Cannot be instantiated. Instead, use the respective subclasses' SeionInstance.create().

SeionInstance adds control capabilities and is managed by SeionGroup as part of SeiON's effort to control the no. of SoundChannels playing simultaneously. Extend this class to create custom playback functionality that makes use of SeiON's allocation infrastructure.

Public Properties

| Property | Defined By
--- | --- | ---
|  | autodispose : Boolean [read-only] Whether this sound is auto-disposable. | SeionInstance
|  | isPaused : Boolean [read-only] | SeionInstance
|  | isPlaying : Boolean [read-only] | SeionInstance
|  | length : Number [read-only] | SeionInstance
|  | manager : SeionGroup [read-only] Returns the manager that holds this ISeionInstance. | SeionInstance
|  | name : String The name of the clip, non-unique. | SeionInstance
|  | pan : Number Get: The panning as affected by its parent. | SeionInstance
|  | position : Number [read-only] | SeionInstance
|  | progress : Number [read-only] | SeionInstance
|  | repeat : int How many times the SeionInstance is programmed to repeat itself. | SeionInstance
|  | repeatLeft : int [read-only] How many more times the SeionInstance has to repeat itself. | SeionInstance
|  | soundtransform : SoundTransform [read-only] Returns the predefined sound properties of the sound. | SeionInstance
|  | volume : Number Get: The volume as affected by its parent. | SeionInstance

Public Methods

| Method | Defined By
--- | --- | ---
|  | SeionInstance(secretKey:*) Do not instantiate. | SeionInstance
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void | SeionInstance
|  | dispatchEvent(event:Event):Boolean | SeionInstance
|  | dispose():void ABSTRACT | SeionInstance
|  | hasEventListener(type:String):Boolean | SeionInstance
|  | isDisposed(output:Boolean = true):Boolean Is the SeionInstance already disposed of? (ISeionInstance) | SeionInstance
|  | pause():void | SeionInstance
|  | play():void | SeionInstance
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void | SeionInstance
|  | resume():void | SeionInstance
|  | stop():void | SeionInstance
|  | willTrigger(type:String):Boolean | SeionInstance

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | soundComplete | Defines the value when a SeionInstance finishes playback and does not repeat. | SeionInstance
|  | soundRepeat | Defines the value when a SeionInstance loops itself. | SeionInstance

Property Detail

autodispose | property

`autodispose:Boolean` [read-only]

Whether this sound is auto-disposable. (ISeionInstance)

Implementation
`public function get autodispose():Boolean`

isPaused | property |

`isPaused:Boolean` [read-only]

Implementation
`public function get isPaused():Boolean`

isPlaying | property |

`isPlaying:Boolean` [read-only]

Implementation
`public function get isPlaying():Boolean`

length | property |

`length:Number` [read-only]

Implementation
`public function get length():Number`

manager | property |

`manager:SeionGroup` [read-only]

Returns the manager that holds this ISeionInstance. (ISeionInstance)

Implementation
`public function get manager():SeionGroup`

name | property |

`name:String`

The name of the clip, non-unique. (ISeionInstance)

Implementation
`public function get name():String`
`public function set name(value:String):void`

pan | property |

`pan:Number`

Get: The panning as affected by its parent.

Set: The personal adjustable panning unaffected by anything.

ISeionControl
Implementation
`public function get pan():Number`
`public function set pan(value:Number):void`

position | property |

`position:Number` [read-only]

Implementation
`public function get position():Number`

progress | property |

`progress:Number` [read-only]

Implementation
`public function get progress():Number`

repeat | property |

`repeat:int`

How many times the SeionInstance is programmed to repeat itself. 0 means no repeats. -1 means infinite repeats.

ISeionInstance
Implementation
`public function get repeat():int`
`public function set repeat(value:int):void`

repeatLeft | property |

`repeatLeft:int` [read-only]

How many more times the SeionInstance has to repeat itself. To reset repeatLeft, set repeat. 0 means no repeats. -1 means infinite repeats.

ISeionInstance
Implementation
`public function get repeatLeft():int`

soundtransform | property |

`soundtransform:SoundTransform` [read-only]

Returns the predefined sound properties of the sound. (ISeionInstance)

Implementation
`public function get soundtransform():SoundTransform`

volume | property |

`volume:Number`

Get: The volume as affected by its parent.

Set: The personal adjustable volume unaffected by anything.

ISeionControl
Implementation
`public function get volume():Number`
`public function set volume(value:Number):void`
Constructor Detail

SeionInstance | () | Constructor

`public function SeionInstance(secretKey:*)`

Do not instantiate. Use the respective SeionInstance.create() instead.

Parameters

| `secretKey:*`

Throws

| `IllegalOperationError When` — you try to directly instantiate ISeionInstance without using SeionGroup.createSound().

Method Detail

addEventListener | () | method

`public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void`

Parameters

| `type:String`
| `listener:Function`
| `useCapture:Boolean` (default = `false`)``
| `priority:int` (default = `0`)``
| `useWeakReference:Boolean` (default = `false`)``

dispatchEvent | () | method |

`public function dispatchEvent(event:Event):Boolean`

Parameters

| `event:Event`

Returns

| `Boolean`

dispose | () | method |

`public function dispose():void`

ABSTRACT

hasEventListener | () | method |

`public function hasEventListener(type:String):Boolean`

Parameters

| `type:String`

Returns

| `Boolean`

isDisposed | () | method |

`public function isDisposed(output:Boolean = true):Boolean`

Is the SeionInstance already disposed of? (ISeionInstance)

Parameters

| `output:Boolean` (default = `true`)`` — If true, a trace() message is given as well.

Returns

| `Boolean`

pause | () | method |

`public function pause():void`

play | () | method |

`public function play():void`

removeEventListener | () | method |

`public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void`

Parameters

| `type:String`
| `listener:Function`
| `useCapture:Boolean` (default = `false`)``

resume | () | method |

`public function resume():void`

stop | () | method |

`public function stop():void`

willTrigger | () | method |

`public function willTrigger(type:String):Boolean`

Parameters

| `type:String`

Returns

| `Boolean`

Event Detail

soundComplete | Event

Event Object Type: `flash.events.Event`

Defines the value when a SeionInstance finishes playback and does not repeat.

soundRepeat | Event |

Event Object Type: `com.SeiON.Event.SeionEvent`

Defines the value when a SeionInstance loops itself.

Tue Jun 21 2011, 10:05 PM +08:00