BUG: ActiveMovie Mixing Sample (AM.htm) Not Working Correctly (181778)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
This article was previously published under Q181778 SYMPTOMS
The buttons in the ActiveMovie Mixing sample that is included with the
Internet Client SDK (\INetSDK\Samples\DHTML\MMAudio\AM.htm) never become
enabled.
Also, on Windows NT, no mixing occurs. Only one sound plays at a time.
CAUSE
The first problem is the result of script errors in the HTML page. This
sample incorrectly defines the ReadyStateChange event handler as taking no
parameters. In fact, ReadyStateChange takes one parameter, and therefore
the script handlers never catch the event.
The second problem is by design. The ActiveMovie control does not support
mixing on Windows NT.
RESOLUTION
Change the event handler definitions for ReadyStateChange in the <SCRIPT>
block to the following:
Sub AM?_ReadyStateChange(ReadyState)
NOTE: The ? (question mark sign) is both 1 and 2.
Also, on the AM2 object tag declaration, change the FileName PARAM to read:
<PARAM NAME="FileName" VALUE="drums.wav">
To support mixing on Windows NT, the Direct Animation control must be used
in lieu of the ActiveMovie control. The AudioMixing DirectXMedia sample
(\INetSDK\Samples\DXM\Samples\da\VBScript\Templates\AudioMixing.html) has a
good demonstration of mixing equivalent to AM.htm.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
The ActiveMovie mixing sample demonstrates sound mixing using the
ActiveMovie Control.
This sample contains two buttons, one for channel A and one for channel B.
Each channel has an associated sound that can eventually be played by
pressing one of these buttons.
The text color of these buttons is initially set to white to indicate that
the channels are being loaded. In addition, two variables (achan and bchan)
are declared and initially set to the value of 2 to indicate that the
channels are being loaded.
When the each channel is finished loading, the ActiveMovie control fires
the ReadyStateChange event. The event handlers for this event set achan and
bchan to 0 to indicate that the sound associated with each channel is ready
to be played.
Because this sample declares the event handlers for ReadyStateChange
incorrectly, the buttons are never enabled, and therefore pressing these
buttons has no effect. Also note that the second ActiveMovie control has
been given an incorrect file name for its sound file.
Modification Type: | Major | Last Reviewed: | 12/22/1999 |
---|
Keywords: | kbbug KB181778 |
---|
|