Solved

Flash: I need to be able to translate characters

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
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.

707 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

20 Experts available now in Live!

Get 1:1 Help Now