# Convert Text to... and then back after... Interesting

**URL:** <https://forum.kirupa.com/t/convert-text-to-and-then-back-after-interesting/248719>\
**Category:** flash\
**Created:** [January 11, 2008, 1:24am UTC](https://forum.kirupa.com/t/convert-text-to-and-then-back-after-interesting/248719 "2008-01-11T01:24:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sup\_legolas](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@sup\_legolas](https://forum.kirupa.com/u/sup_legolas)\
**Post date:** [January 11, 2008, 1:24am UTC](https://forum.kirupa.com/t/convert-text-to-and-then-back-after-interesting/248719/1 "2008-01-11T01:24:55Z")

</div>

Currently, I’m interested in making text convert to the ASCII Code Number, and then convert back. This is no problem, I’ve accomplished this in the code below, the trick would be to make the output letters vary by 3 letters, thus making the output with three letters later.

ex: “abc” would become “def”

Here’s the code so far…

```auto
sampleString = "sample";
_root.newArr = []
for (i=0; i<sampleString.length; i++) {
    _root["b"+i] = (sampleString.charAt(i));
    trace(_root["b"+i]);
    _root["c"+i] = ord(_root["b"+i]);
    trace("converted to ASCII= "+_root["c"+i]);
    newArr.push(chr(_root["c"+i]));
    trace("Converted from ASCII= "+_root.newArr*);
}
a = newArr.join("-");
trace(a);

```

Help is always appreciated!
