<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 so much for the quick help. The function works fine now.<br><br>Quick community response to problems is one of the many great features of Xerte!<br><br>Have a great day,<br>Kent<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: Julian.Tenney@nottingham.ac.uk<br>To: xerte@lists.nottingham.ac.uk<br>Date: Wed, 23 Jan 2013 09:44:38 +0000<br>Subject: [Xerte] Re: Accessing breakApart() words<br><br><style><!--
.ExternalClass .ecxshape
{;}
--></style><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 p.ecxMsoAcetate, .ExternalClass li.ecxMsoAcetate, .ExternalClass div.ecxMsoAcetate
{font-size:8.0pt;font-family:"Tahoma","sans-serif";}
.ExternalClass p.ecxecxmsonormal, .ExternalClass li.ecxecxmsonormal, .ExternalClass div.ecxecxmsonormal
{font-size:12.0pt;font-family:"Times New Roman","serif";}
.ExternalClass p.ecxecxmsochpdefault, .ExternalClass li.ecxecxmsochpdefault, .ExternalClass div.ecxecxmsochpdefault
{font-size:12.0pt;font-family:"Times New Roman","serif";}
.ExternalClass span.ecxecxmsohyperlink
{;}
.ExternalClass span.ecxecxmsohyperlinkfollowed
{;}
.ExternalClass span.ecxecxemailstyle18
{;}
.ExternalClass p.ecxecxmsonormal1, .ExternalClass li.ecxecxmsonormal1, .ExternalClass div.ecxecxmsonormal1
{font-size:12.0pt;font-family:"Times New Roman","serif";}
.ExternalClass span.ecxecxmsohyperlink1
{color:blue;text-decoration:underline;}
.ExternalClass span.ecxecxmsohyperlinkfollowed1
{color:purple;text-decoration:underline;}
.ExternalClass span.ecxecxemailstyle181
{font-family:"Calibri","sans-serif";color:#1F497D;}
.ExternalClass p.ecxecxmsochpdefault1, .ExternalClass li.ecxecxmsochpdefault1, .ExternalClass div.ecxecxmsochpdefault1
{font-size:10.0pt;font-family:"Times New Roman","serif";}
.ExternalClass span.ecxBalloonTextChar
{font-family:"Tahoma","sans-serif";}
.ExternalClass span.ecxEmailStyle30
{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">Use the attached engine, I fixed a small bug there, thanks,</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> 23 January 2013 01:22<br><b>To:</b> Xerte Lists<br><b>Subject:</b> [Xerte] Re: 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"">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></span></p><div><div class="ecxMsoNormal" style="text-align:center" align="center"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><hr id="ecxstopSpelling" align="center" size="2" width="100%"></span></div><p class="ecxMsoNormal" style=""><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From: <a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a><br>To: <a href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a><br>Date: Tue, 22 Jan 2013 15:24:54 +0000<br>Subject: [Xerte] Re: Accessing breakApart() words</span></p><div><p class="ecxMsoNormal" style=""><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><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""></span></p><p class="ecxMsoNormal" style=""><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""></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"> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">mailto:xerte-bounces@lists.nottingham.ac.uk</a>] <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><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""></span></p></div></div><p class="ecxMsoNormal" style=""><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></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><p class="ecxMsoNormal" style=""><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br><br><br><br>_______________________________________________ Xerte mailing list <a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a></span></p></div></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>