I just wrote 2 simple classes to validate email addresses and Belgian cell phone numbers in AS2 and AS3.
Might come in handy for you, they’re available for download here.
I included FLA’s for Flash8 and FlashCS3 for AS2 and AS3.
They show 2 TextInput components, one for an email address and one for a cell phone number.
The cell phone validation includes a “strip” function. Since people tend to enter their phone numbers in different ways, dots, blanks and slashes are removed from the input before validating the number.
Continue reading “Email and cell phone validation in AS2 and AS3″
If ever you need to encrypt or decrypt something from in AS2 or AS3, this might come in handy for you.
I’ve started off with the great encryption classes written for AS2 by meychi.com (currently offline), but felt there had to be a more user-friendly way of using them, so I got to work on it last night and think I’ve come up with a pretty elegant solution.
You can download the ZIP-archive to try it out for yourself.
Please note that this release is still early alpha and there’s probably alot of room for improvement, I’ll post updated copies for the files here regularly. There’s also still little documentation in the files and there aren’t any unit tests yet.
Inside the ZIP you’ll find an FLA for AS2 and one for AS3. The AS2 FLA comes in a Flash8 and a FlashCS3 flavour.
The FLA’s contain a single MovieClip with a linkage to their respective .as source files.
Inside the package be.boulevart.as2.security are the wrapper classes I wrote for the original AS2 implementation by meychi.
What this does is provide you with an elegant way of using any encryption type with just a single line of code:
e = new Encryption(EncryptionTypes.RC4(), str , this.theKey, null, null, null);
See what I did with the EncryptionTypes there?
Continue reading “Encryption in AS2 and AS3″