Microsoft KB Archive/181778

= BUG: ActiveMovie Mixing Sample (AM.htm) Not Working Correctly =

Article ID: 181778

Article Last Modified on 12/22/1999

-

APPLIES TO


 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2

-



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  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:  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.



STATUS
Microsoft 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.

Additional query words: ActiveMovie am.htm

Keywords: kbbug kbnofix KB181778

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.