Solved

Flash: I need to be able to translate characters

Posted on 2004-07-31
4
157 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

911 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now