A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Keep Users from Adding Bad Words

  1. #1
    Senior Member
    Join Date
    Jun 2000
    Posts
    896
    hi guys.

    just wanted to remind anyone that didnt know that i submitted a badword detection engine to flashkit some time ago:

    http://www.flashkit.com/movies/Appli...42/index.shtml

    you can type in hundreds of words to a "wordbank" text field. then when someone presses submit, you can call this function and it will detect whether it should be passed or not. you have the option of replace the badword with a word of choice.

    also, with the highscore files i created for download at Ultimate Arcade ( http://www.ultimatearcade.com )it has this functionality already built in.

    the truth is that if you dont put in detection, people will take advantage of it.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    123
    cool code, jobem

    how would you suggest that i handle special characters? would i enter the text urlencoded in the 'wordbank' and then urlencode to a coupla spots for 'my_name?'

    -toyin

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Posts
    896
    hi

    to tell you the truth, with the advent of flash 5 i would just write the thing over. with flash 5 you can just use string.split() to create an array and search through it in like 3 or 4 lines of code. the method i put forth in that flash 4 version converts the characters to ascii, checks to make sure it is 1 of the 26 characters, forces it to lowercase, checks against the words in the wordbank, and then replaces if necessary.

    so it will not look for special characters, you can try url encoding and see if that works....but it probably wont since that uses special characters itself (%'s and stuff).

    i will post the flash 5 code for it if i write it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center