Flash: I need to be able to translate characters

I need to be able to translate "a" to "k" or "4" to "q" and so on.

Is there an easy way to do this with actionscript?

Any help or advice would be great. I'm a perl guy, so if there is something similar to $line =~ tr/[1234567890]/[abcdefghij]/; that would be great :)

The swf file needs to be stand alone...   otherwise I'd use a perl script.

Thank you very much.

Best regards,

Dr34m3r

LVL 1
dr34m3rsAsked:
Who is Participating?
 
hsmtpConnect With a Mentor Commented:
Dr34m3r,

Get this file: http://www.jurjans.lv/flash/RegExp.zip
It has examples of use.

Include the class in the first frame (take care about path from your .fla to it):

#include "RegExp.as"

You'll also find a brief documentation at this page: http://www.jurjans.lv/flash/RegExp.html

But take a look at the sample - it has more then documentation.
0
 
hsmtpCommented:
Try RegExp class for Flash: http://www.jurjans.lv/flash/RegExp.html
0
 
dr34m3rsAuthor Commented:
How do I implement that class? Where do I put the file, what code do I use and where?

Thank you very much.

Best regards,

Dr34m3r
0
 
dr34m3rsAuthor Commented:
Hey there :)

Sorry it took so long to get back to you on this.

Thank you for all your help in this matter!!!

Best regards,

Dr34m3r
0
All Courses

From novice to tech pro — start learning today.