Desmond
10-10-2003, 03:29 PM
<HTML> <HEAD> <TITLE>PROBLEM: AMS40 Crashes With Page.HideObject and Dialog.MessageBox</TITLE> </HEAD> <BODY> <h3>PROBLEM: AMS40 Crashes With Page.HideObject and Dialog.MessageBox</h3> <b>Document ID: IR04048</b> <hr> The information in this article applies to: <ul> <li>AutoPlay Media Studio 4.0</li> </ul> <hr> <h3>SUMMARY</h3> <p> This article explains the problem where your application will crash if you use Page.HideObject and Dialog.MessageBox on the On Stop event of your media player object. </p> <h3>DISCUSSION</h3> <p> If you attempt to hide the media player object, and then display a message box as in the following example, your application will generate a runtime error and crash: </p> <p> Page.HideObject("MediaPlayer1");<br> %Result% = Dialog.MessageBox("Title", "Message", Ok, Question); </p> <p>This is a known bug, and should not be done. Instead, display the message box before you hide the media player object. These actions when implemented as follows will not crash your application: </p> <p> %Result% = Dialog.MessageBox("Title", "Message", Ok, Question);<br> Page.HideObject("MediaPlayer1"); </p> <p> KEYWORDS: AutoPlay Media Studio 4.0, crash, bug, Page, HideObject, Hide, Object, Dialog, MessageBox, Message, Box </p> <hr> <FONT SIZE=1> Last reviewed: October 10, 2003<br> Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br> </FONT> </BODY> </HTML>