<doc>
  <legacy_id>1734</legacy_id>
  <name>playStopped</name>
  <type>message</type>
  <syntax>
    <example>playStopped</example>
  </syntax>
  <library></library>
  <objects>
    <player/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Images &amp; Multimedia</category>
  </classification>
  <references>
    <command tag="start">start Command</command>
    <command tag="play">play Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Sent to a <keyword tag="player">player</keyword> when it stops playing.</summary>
  <examples>
    <example>on playStopped </p><p>  hide the target</p><p>  show button "Start Playing"</p><p>end playStopped</example>
  </examples>
  <description>
    <p>Handle the <b>playStopped</b> <keyword tag="message box">message</keyword> if you want to perform a task when a movie or sound finishes playing.</p><p/><p><b>Comments:</b></p><p>The <b>playStopped</b> <keyword tag="message box">message</keyword> is sent when the movie or sound reaches its end, or when a play stop <glossary tag="command">command</glossary> <glossary tag="execute">executes</glossary>. If the user pauses the movie or sound, the <message tag="playPaused">playPaused</message> <keyword tag="message box">message</keyword> is sent instead.</p><p/><p>When an audio clip or video clip is playing, a temporary player is created for it. When the clip is finished, the <b>playStopped</b> <keyword tag="message box">message</keyword> is sent to it.</p><p/><p><b>Note:</b> The <b>playStopped</b> <keyword tag="message box">message</keyword> is sent when a <keyword tag="card">card</keyword> containing the <keyword tag="player">player</keyword> closes and when the <glossary tag="player">player's filename property</glossary> is changed.  If the <object tag="player">player</object> is hidden, or the movie or sound is not currently running, the message will still be sent.  To prevent a <b>playStopped </b> <glossary tag="handler">handler</glossary> from being <glossary tag="execute">executed</glossary> inappropriately, set the <property tag="lockMessages">lockMessages</property> to true before changing the <property tag="filename">filename</property> or switching <glossary tag="card">cards</glossary>:</p><p/><p>  lock messages <i>-- prevent sending playStopped</i></p><p>  set the filename of me to newFile</p><p>  unlock messages</p>
  </description>
</doc>