<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>

Julian,<br><br>Thanks for you input.<br><br>I added a button with the following script<br><br>w[0].setText("Test " + p);<br>p++;<br>debug(p);<br><br>where p is initialized to 0 in earlier script.<br><br>Here's the earlier script (attached directly to the page)<br><br>w = IdPrayer.breakApart(25, 5, true, false);<br>t = new Array(200);      // Array t is used to keep track of which words have been replaced.<br>for(i=0; i<200; i++)<br>{<br>    t[i] = -1;                 // -1 designates the original text is in the word<br>}<br><br>p = 0;<br><br><br>As I press the button multiple times, the word only changes to "Test 0".<br><br>The debug window shows that p is increasing.  Therefore, I know the script is executing with each button press but that the value of w[0] only changes on the first button press.<br><br>I noticed I was running Xerte 2.16 so I uninstalled using the control panel and re-installed 2.18.  This made no difference.<br><br>BTW - this is not of great importance.  Don't turn this into a time killer.  But if you have any suggestions for me to try, please let me know.<br><br>Have a great evening,<br>Kent<br><br><br><div><div id="ecxSkyDrivePlaceholder"></div><hr id="ecxstopSpelling">From: Julian.Tenney@nottingham.ac.uk<br>To: xerte@lists.nottingham.ac.uk<br>Date: Tue, 22 Jan 2013 15:24:54 +0000<br>Subject: [Xerte] Re: Accessing breakApart() words<br><br><style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{font-size:12.0pt;font-family:"Times New Roman","serif";}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{font-size:12.0pt;font-family:"Times New Roman","serif";}
.ExternalClass span.ecxEmailStyle18
{font-family:"Calibri","sans-serif";color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;}
.ExternalClass div.ecxWordSection1
{page:WordSection1;}

</style><div class="ecxWordSection1"><p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">WORDs have set text which will set the text. I don’t see why that would stop working: is wordClicked the problem, rather than setText() – can you try calling setText() on w[0] through a button press several times to see if it fails?</span></p><p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="ecxMsoNormal" style=""><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Kent Chesnut<br><b>Sent:</b> 22 January 2013 01:42<br><b>To:</b> Xerte Lists<br><b>Subject:</b> [Xerte] Accessing breakApart() words</span></p></div></div><p class="ecxMsoNormal" style=""> </p><div><p class="ecxMsoNormal" style=""><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">All,<br><br>I use breakApart() to convert a text field into a series of movie clips.<br><br>    w = IdPrayer.breakApart(25, 5, true, false);<br><br>I am then able to access the text and the index of a word when it is clicked.<br><br>    Txt = IdPrayer.wordClicked.text;<br>    Index = IdPrayer.wordClicked.index;<br><br>I am able to replace the text<br><br>    IdPrayer.wordClicked.setText(rep);<br><br>However, I am only able to set the text 1 time.  And although the word changes on the screen, IdPrayer.wordClicked.text has the original string in it when I click the modified word.  If I try to change the text a second time, nothing happens.<br><br>    IdPrayer.wordClicked.setText("Something else");<br><br><br>I'm guessing that setText() is not what I should be using here... but haven't found what I should be using.<br><br>Thanks in advance for any help you can provide.<br><br>Have a great evening,<br>Kent</span></p></div></div>
<br><br>
<br><br>_______________________________________________
Xerte mailing list
Xerte@lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte</div>                                          </div></body>
</html>