Hi
See I have three sentences and five option words.
Now I want to color these five words in red color within sentences.

sentences and words are coming from two different arrays.
lets suppose,
these are words and sentences:
var arrOptions = "wanted|bus:They|walk:like"
var strQuesText="Rosa wanted to ride the bus:They would walk to work:I would like to have cake";

Now these option words should appear in red color on screen within respective sentences.


pls guide..

this is my try,but it colors only last word from third sentence.
something is wron here.......
str = new Array();
for (a=0; a<tempQuest.length; a++) {
str = tempQuest[a].split(" ");
_root.dm = " "+"str[i]="+str+":" add tempQuest;
for (i=0; i<strg.length; i++) {
for (j=0; j<str.length; j++) {
if (str[i] eq strg[i]) {
//_root.dm = "strg=="+strg[j]+"=="+"str[i]="+str[a];
index = i;
str[i] = "<font color='#FF0000'>"+str[index]+"</font>";
}
}
}
eval("Quest" add ctr add "_txt").htmlText = str.join(" ");
ctr++;
}