Thanks, Julian, you're absolutely right.  <br><br>But now I'm trying to figure out how to implement this without a button for each task.  When I read the flash documentation it's all about defining a named or anonymous function that is invoked onLoad, which we can't do in xerte, right?  <br>

<br>
<br><div class="gmail_quote">On Fri, Feb 4, 2011 at 4:26 AM, Julian Tenney <span dir="ltr"><<a href="mailto:Julian.Tenney@nottingham.ac.uk" target="_blank">Julian.Tenney@nottingham.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


<div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Is the sound loaded before you call start()? It might need to load before the method works. Try mocking up an interaction with a button to load the sound, a button to make it play, see if that works. In the engine I handle onLoad to control the autoPlay setting, so I think that’s the right approach.</span></p>


<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;">


<p class="MsoNormal" style="margin-left: 36pt;"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Mary Ann Ahearn<br>


<b>Sent:</b> 04 February 2011 07:03<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] Re: Problem looping sound controlled by script - Xerte 2 desktop</span></p></div><div><div></div><div><p class="MsoNormal" style="margin-left: 36pt;">


 </p><p class="MsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;">Hi Julian,<br><br>Things just got weird using this technique to control sound.  Haven't  had time to investigate yet, but thought I'd ask in case the answer is as easy for you as the last one was.</p>


<div style="margin-left: 30pt;"><p class="MsoNormal" style="margin-left: 36pt;">soundIcon.sound.stop(); <br>soundIcon.loadSound(FileLocation + 'mySoundFile.mp3');</p></div><div><div style="margin-left: 30pt;"><p class="MsoNormal" style="margin-left: 36pt;">


soundIcon.sound.start(0,100);</p></div><p class="MsoNormal" style="margin-left: 36pt;"> </p></div><p class="MsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;"><br>Accessing the flash sound object with these calls works fine when I play the rlo file in preview mode. iI also works when I play it from a flash swf file that loads it with this:<br>


     attachMovie('Xerte', 'myRLO', 0);<br><br>But if I publish the rlo and try to play it in a browser, or if I play my flash "wrapper" in a browser I don't hear these sound files.  I do hear the other sounds in my rlo that I'm playing in the standard way.<br>


<br>Any ideas as to what's going on?<br><br>Thanks a million!<br>ma</p><div><p class="MsoNormal" style="margin-left: 36pt;">On Tue, Feb 1, 2011 at 11:20 AM, Mary Ann Ahearn <<a href="mailto:maryann@moberg.com" target="_blank">maryann@moberg.com</a>> wrote:</p>


<p class="MsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;">Indeed it is!<br>Thanks<br>ma</p><div><div><div><p class="MsoNormal" style="margin-left: 36pt;">On Tue, Feb 1, 2011 at 10:56 AM, Julian Tenney <<a href="mailto:Julian.Tenney@nottingham.ac.uk" target="_blank">Julian.Tenney@nottingham.ac.uk</a>> wrote:</p>


</div></div><blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;">


<div><div><div><div><p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Easy.</span></p><p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>


<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Access the underlying sound object, mySoundIcon.sound and control it directly with the Sound object’s methods</span></p>


<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">myIcon.sound.start(offset, loopCount);</span></p>


<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0cm 0cm; border-color: -moz-use-text-color;">


<p class="MsoNormal" style="margin-left: 72pt;"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Mary Ann Ahearn<br>


<b>Sent:</b> 01 February 2011 15:53<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] Problem looping sound controlled by script - Xerte 2 desktop</span></p></div><div><div><p class="MsoNormal" style="margin-left: 72pt;">


 </p><p class="MsoNormal" style="margin-left: 72pt;">I was feeling smug enough about controlling sound via script yesterday to dare to post an answer to someone's question!!  Ha!  The gods don't like hubris.<br><br>


Today everything is different.<br><br>I've got a button that plays a sound when clicked. I'd like the sound to loop and the button to toggle it on and off<br><br>It seems to forget its loop value when I start controlling it via script.<br>


<br>mySoundIcon.play();<br><br>However if I just put the sound icon under a button icon and set it to play =1 and loop = 5, then the looping works and all is fine.  I can even stop it and reset it without any problems.  Just can't manage to play it from script more than one time.<br>


<br>Tried putting an onSoundComplete event to reset it and play it but it just went mad and looped very bizarrely without ever waiting to finish.<br><br>Then I tried the getSound route but can't seem to get the timing right so this always returns undefined.<br>


<br>Any ideas?  I think I must be missing something very simple.<br><br>Thanks!<br>ma</p></div></div></div><p class="MsoNormal" style="margin-left: 36pt;"> </p><p style="margin-left: 36pt;">This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. </p>


<p style="margin-left: 36pt;">This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. </p>


</div><p class="MsoNormal" style="margin-left: 36pt;"> </p></div></div><p class="MsoNormal" style="margin-left: 36pt;">_______________________________________________<br>Xerte mailing list<br><a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>


<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a></p><div><p class="MsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;">


<br><br>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>


<br>This message has been checked for viruses but the contents of an attachment<br>may still contain software viruses which could damage your computer system:<br>you are advised to perform your own checks. Email communications with the<br>


University of Nottingham may be monitored as permitted by UK legislation.<br><br></p></div></blockquote></div><p class="MsoNormal" style="margin-left: 36pt;"> </p></div><p class="MsoNormal" style="margin-left: 36pt;"> </p>


</div></div></div></div><br>_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
<br>
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>



<br>
This message has been checked for viruses but the contents of an attachment<br>
may still contain software viruses which could damage your computer system:<br>
you are advised to perform your own checks. Email communications with the<br>
University of Nottingham may be monitored as permitted by UK legislation.<br>
<br>
<br></blockquote></div><br>