<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.ecxmsonormal, li.ecxmsonormal, div.ecxmsonormal
        {mso-style-name:ecxmsonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.ecxmsochpdefault, li.ecxmsochpdefault, div.ecxmsochpdefault
        {mso-style-name:ecxmsochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.ecxmsohyperlink
        {mso-style-name:ecxmsohyperlink;}
span.ecxmsohyperlinkfollowed
        {mso-style-name:ecxmsohyperlinkfollowed;}
span.ecxemailstyle18
        {mso-style-name:ecxemailstyle18;}
p.ecxmsonormal1, li.ecxmsonormal1, div.ecxmsonormal1
        {mso-style-name:ecxmsonormal1;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.ecxmsohyperlink1
        {mso-style-name:ecxmsohyperlink1;
        color:blue;
        text-decoration:underline;}
span.ecxmsohyperlinkfollowed1
        {mso-style-name:ecxmsohyperlinkfollowed1;
        color:purple;
        text-decoration:underline;}
span.ecxemailstyle181
        {mso-style-name:ecxemailstyle181;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
p.ecxmsochpdefault1, li.ecxmsochpdefault1, div.ecxmsochpdefault1
        {mso-style-name:ecxmsochpdefault1;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle30
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Use the attached engine, I fixed a small bug there, thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> 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<o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt'><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><o:p></o:p></span></p><div><div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><hr size=2 width="100%" align=center id=ecxstopSpelling></span></div><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt'><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<o:p></o:p></span></p><div><p class=MsoNormal style='margin-left:36.0pt'><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"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><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"'><o:p></o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <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"'><o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <o:p></o:p></span></p><div><p class=MsoNormal style='margin-left:36.0pt'><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<o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-left:36.0pt'><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">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><o:p></o:p></span></p></div></div></div></body></html>