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

Last reviewed: February 27, 1998
Article ID: Q181778
The information in this article applies to:
  • Internet Client SDK, versions 4.0, 4.01

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.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

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 : AXSDKMisc
Technology : kbinetdev
Version : WINDOWS:4.0,4.01
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbnofix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 27, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.