Solved

Flash: I need to be able to translate characters

Posted on 2004-07-31
4
165 Views
Last Modified: 2010-04-03
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

0
Comment
Question by:dr34m3rs
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:hsmtp
ID: 11683232
Try RegExp class for Flash: http://www.jurjans.lv/flash/RegExp.html
0
 
LVL 1

Author Comment

by:dr34m3rs
ID: 11686937
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
 
LVL 6

Accepted Solution

by:
hsmtp earned 500 total points
ID: 11687460
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
 
LVL 1

Author Comment

by:dr34m3rs
ID: 11769807
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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question