[Xerte] Re: Problem looping sound controlled by script - Xerte 2 desktop
Mary Ann Ahearn
maryann at moberg.com
Tue Feb 1 16:20:09 GMT 2011
Indeed it is!
Thanks
ma
On Tue, Feb 1, 2011 at 10:56 AM, Julian Tenney <
Julian.Tenney at nottingham.ac.uk> wrote:
> Easy.
>
>
>
> Access the underlying sound object, mySoundIcon.sound and control it
> directly with the Sound object’s methods
>
>
>
> myIcon.sound.start(offset, loopCount);
>
>
>
> *From:* xerte-bounces at lists.nottingham.ac.uk [mailto:
> xerte-bounces at lists.nottingham.ac.uk] *On Behalf Of *Mary Ann Ahearn
> *Sent:* 01 February 2011 15:53
> *To:* Xerte discussion list
> *Subject:* [Xerte] Problem looping sound controlled by script - Xerte 2
> desktop
>
>
>
> 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.
>
> Today everything is different.
>
> 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
>
> It seems to forget its loop value when I start controlling it via script.
>
> mySoundIcon.play();
>
> 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.
>
> 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.
>
> Then I tried the getSound route but can't seem to get the timing right so
> this always returns undefined.
>
> Any ideas? I think I must be missing something very simple.
>
> Thanks!
> ma
>
> 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.
>
> 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.
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> 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.
>
> 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.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110201/80307857/attachment.html>
More information about the Xerte
mailing list