Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Help 1

Status
Not open for further replies.

Brian56

Programmer
May 29, 2003
66
CA
Hi,

I am making an educational CD for children grades 6-12. The section I am currently working on concerns improving the childs use of English.

I need help with a function. The chlid has to type in a word and Flash has to determine if it is a palindrome or not and display an appropriate message. I can handle the messages but after two days of fruitless attempts at coding such a function I am close to giving up.

If someone could just point me in the right direction I would be very grateful.

Thanks,

Brian.
 
an input box, a dynamic text box for answer and a button

my_btn.onRelease = function(){
palin = myInput.text.split("").reverse().join("");
if (palin==myInput.text){
answer.text = "Is a palindrome";
}else{
answer.text = "Not a palindrome";
}
}
 
Many, many, thanks.

I had tried permutations of your code but never hit upon that solution.

Brilliant.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top