[Xerte] Re: Desktop - bypassing a sound based on variable

Kent Chesnut kent_chesnut at hotmail.com
Sun Feb 10 16:25:36 GMT 2013


Dave,
That's better than my method.  I had followed the script that had the play() with an interaction with a onSoundComplete event that exited the interaction to implement wait.  It appeared to work but took several icons.

Have a great day,
Kent

From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sun, 10 Feb 2013 10:33:38 -0500
Subject: [Xerte] Re: Desktop - bypassing a sound based on variable






But, you gave me an idea.
I've put the Sound icon directly on the flow line and preceded it with a script:
if blah  icon.nextSibling.attributes.play = 1;  icon.nextSibling.attributes.wait = 1; else   icon.nextSibling.attributes.play = 0;  icon.nextSibling.attributes.wait = 0; end

Using the procedure we talked about yesterday.Altering the xml before the object is even created, so it instantiates with those properties.









From: kent_chesnut at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sun, 10 Feb 2013 08:06:50 -0600
Subject: [Xerte] Re: Desktop - bypassing a sound based on variable





Dave,

You probably already tried this... but just in case...

Can you set the play property of the sound to 0 and then use SoundID.play() in a subsequent script icon to play the sound if your condition is met?

Have a great day,
Kent

From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sun, 10 Feb 2013 07:28:40 -0500
Subject: [Xerte] Desktop - bypassing a sound based on variable






Julian, I know we went down this road once before, and can't remember the outcome.
In AW it was fairly common to use a Decision icon to say, enable/disable the playing of sound in a piece.
You hung the sound off the dec icon, then used a calculated path, 0 or 1.That worked because AW is one based, so the first path was 1.If you set 0, it bypassed the dec icon and continued down the flow line.
So, what can I do with Xerte's 0 based dec icon?-1 does nothing, flow just stops at the dec icon.
As a bit of a kludge, I found setting the repeat property to zero does what I want, but I can't get that property to accept a variable.If I try to use a variable it just repeats endlessly.
Missing something or some other way to skin this cat?
Dave 		 	   		  

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20130210/aa30f5bb/attachment-0001.html>


More information about the Xerte mailing list