Packagecom.dwuser.ss4.pseudoStyleClasses.subEffectReferenceClasses
Classpublic class SoundEffect
InheritanceSoundEffect Inheritance Effect

[Dummy Class Only!] The SoundEffect subeffect plays an MP3 audio file. For example, you could play a sound when a user clicks a Button control. This effect lets you repeat the sound, select the source file, and control the volume and pan.

You specify the URL of the MP3 file using the source property.

This class is part of the EffectLibrary sub-effect documentation. It is a dummy class used only to document the supported parameters for a given sub-effect node.

See also

com.dwuser.ss4.managers.EffectLibrary


Public Properties
 PropertyDefined by
  autoLoad : Boolean
If true, load the MP3 file when the source has been specified.
SoundEffect
  bufferTime : Number
The SoundEffect class uses an internal Sound object to control the MP3 file.
SoundEffect
 Inheritedduration : Number
Duration of the effect in milliseconds.
Effect
  loops : Number
The number of times to play the sound in a loop, where a value of 0 means play the effect once, a value of 1 means play the effect twice, and so on.
SoundEffect
  panEasingFunction : Function
The easing function for the pan effect.
SoundEffect
  panFrom : Number
Initial pan of the Sound object.
SoundEffect
  panTo : Number
Final pan of the Sound object.
SoundEffect
 InheritedrepeatCount : Number
Number of times to repeat the effect.
Effect
 InheritedrepeatDelay : Number
Amount of time, in milliseconds, to wait before repeating the effect.
Effect
  source : String
The URL of the MP3 file to play.
SoundEffect
 InheritedstartDelay : Number
Amount of time, in milliseconds, to wait before starting the effect.
Effect
  startTime : Number
The initial position in the MP3 file, in milliseconds, at which playback should start.
SoundEffect
  useDuration : Boolean
If true, stop the effect after the time specified by the duration property has elapsed.
SoundEffect
  volumeEasingFunction : Function
The easing function for the volume effect.
SoundEffect
  volumeFrom : Number
Initial volume of the Sound object.
SoundEffect
  volumeTo : Number
Final volume of the Sound object.
SoundEffect
Public Methods
 MethodDefined by
  
SoundEffect
Property detail
autoLoadproperty
public var autoLoad:Boolean

If true, load the MP3 file when the source has been specified.

The default value is true.

bufferTimeproperty 
public var bufferTime:Number

The SoundEffect class uses an internal Sound object to control the MP3 file. This property specifies the minimum number of milliseconds worth of sound data to hold in the Sound object's buffer. The Sound object waits until it has at least this much data before beginning playback, and before resuming playback after a network stall.

The default value is 1000.

loopsproperty 
public var loops:Number

The number of times to play the sound in a loop, where a value of 0 means play the effect once, a value of 1 means play the effect twice, and so on. If you repeat the MP3 file, it still uses the setting of the useDuration property to determine the playback time. The duration property takes precedence over this property. If the effect duration is not long enough to play the sound at least once, the sound does not loop.

The default value is 0.

panEasingFunctionproperty 
public var panEasingFunction:Function

The easing function for the pan effect. Use this function to interpolate between the values of panFrom and panTo.

This must be specified as an easing function reference; for more information, see the EASING_FUNCTION_REFERENCE constant on the com.dwuser.ss4.pseudoStyleClasses.XMLAttributeFormats reference class.

See also

panFromproperty 
public var panFrom:Number

Initial pan of the Sound object. The value can range from -1.0 to 1.0, where -1.0 uses only the left channel, 1.0 uses only the right channel, and 0.0 balances the sound evenly between the two channels.

The default value is 0.0.

panToproperty 
public var panTo:Number

Final pan of the Sound object. The value can range from -1.0 to 1.0, where -1.0 uses only the left channel, 1.0 uses only the right channel, and 0.0 balances the sound evenly between the two channels.

The default value is 0.0.

sourceproperty 
public var source:String

The URL of the MP3 file to play.

startTimeproperty 
public var startTime:Number

The initial position in the MP3 file, in milliseconds, at which playback should start.

The default value is 0.

useDurationproperty 
public var useDuration:Boolean

If true, stop the effect after the time specified by the duration property has elapsed. If false, stop the effect after the MP3 finishes playing or looping.

The default value is true.

volumeEasingFunctionproperty 
public var volumeEasingFunction:Function

The easing function for the volume effect. This function is used to interpolate between the values of volumeFrom and volumeTo.

This must be specified as an easing function reference; for more information, see the EASING_FUNCTION_REFERENCE constant on the com.dwuser.ss4.pseudoStyleClasses.XMLAttributeFormats reference class.

See also

volumeFromproperty 
public var volumeFrom:Number

Initial volume of the Sound object. Values can range from 0.0 to 1.0.

The default value is 1.

volumeToproperty 
public var volumeTo:Number

Final volume of the Sound object. Value can range from 0.0 to 1.0.

The default value is 1.

Constructor detail
SoundEffect()constructor
public function SoundEffect()