Microsoft DirectX 8.1 (Visual Basic) |
Begins playing an effect. If the effect is already playing, it is restarted from the beginning. If the effect has not been downloaded or has been modified since its last download, then it will be downloaded before being started. This default behavior can be suppressed by passing the DIES_NODOWNLOAD flag.
object.Start(iterations As Long, flags As Long)
To play the effect exactly once, pass 1. To play the effect repeatedly until explicitly stopped, pass -1. To play the effect until explicitly stopped without re-articulating the envelope, modify the effect parameters with the DirectInputEffect.SetParameters method and change the lDuration member of DIEFFECT to -1.
If the method fails, an error is raised and Err.Number may be set to one of the following:
DIERR_INVALIDPARAM |
DIERR_INCOMPLETEEFFECT |
DIERR_NOTEXCLUSIVEACQUIRED |
DIERR_NOTINITIALIZED |
DIERR_UNSUPPORTED |
The device must be acquired at the exclusive cooperative level for this method to succeed.
Not all devices support multiple iterations.