| Package | com.dwuser.ss4.pseudoStyleClasses.subEffectReferenceClasses |
| Class | public class SoundEffect |
| Inheritance | SoundEffect Effect |
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
| Property | Defined 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 | ||
![]() | duration : 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 | ||
![]() | repeatCount : Number
Number of times to repeat the effect.
| Effect | |
![]() | repeatDelay : Number
Amount of time, in milliseconds, to wait before repeating the effect.
| Effect | |
| source : String
The URL of the MP3 file to play.
| SoundEffect | ||
![]() | startDelay : 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 | ||
| Method | Defined by | ||
|---|---|---|---|
| SoundEffect | |||
| autoLoad | property |
public var autoLoad:BooleanIf true, load the MP3 file when the source has been specified.
The default value is true.
| bufferTime | property |
public var bufferTime:NumberThe 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.
| loops | property |
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.
| panEasingFunction | property |
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
| panFrom | property |
public var panFrom:NumberInitial 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.
| panTo | property |
public var panTo:NumberFinal 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.
| source | property |
public var source:StringThe URL of the MP3 file to play.
| startTime | property |
public var startTime:NumberThe initial position in the MP3 file, in milliseconds, at which playback should start.
The default value is 0.
| useDuration | property |
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.
| volumeEasingFunction | property |
public var volumeEasingFunction:FunctionThe 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
| volumeFrom | property |
public var volumeFrom:NumberInitial volume of the Sound object. Values can range from 0.0 to 1.0.
The default value is 1.
| volumeTo | property |
public var volumeTo:NumberFinal volume of the Sound object. Value can range from 0.0 to 1.0.
The default value is 1.
| SoundEffect | () | constructor |
public function SoundEffect()