# Translating letters too numbers

**URL:** <https://forum.kirupa.com/t/translating-letters-too-numbers/62355>\
**Category:** Uncategorized\
**Created:** [August 27, 2004, 3:46am UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355 "2004-08-27T03:46:27Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 9:29am UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/21 "2004-08-29T09:29:14Z")

</div>

> Although you should use an IF statement instead… otherwise you will get a loop error as the while loop will loop all the time its condition is true…

The condition will not be allways true. It’s not an infinite loop.  
THis was the point. Whenever it gets a space in it’s way it should add it (the space) to the resultcode (resultcode += " “) and increase it’s index (i++) and search again if it’s not another space.  
I used while because some user may type multiple spaces. If i use IF statement it will imediatly pass to the substr. and could result in variables named something like " go” instead of “got” ergo errors at the eval statement.

Mdjstudio you should read this too and maybe you will understand how the script works. I edited it for you… not for prophet … because I realize he knows how the script works :p.  
I won’t have access to flash till monday. But you could post here. What are you confused with :)?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 1:03pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/22 "2004-08-29T13:03:34Z")

</div>

o yeah, i missed that i++ bit 😊

attached a working fla (space support as well ;))  
have a look at it…  
im afraid unless you want 26 IF statements in your decryption script you would be better off sticking to a uniform number of characters…

o and i had to change the vbariable _i_ because obviously there is an I in the alphabet and thats where your numbers were coming from.

also added a few lines to set your second input box equal to the first result box if there were no contents in it - i was too lazy to keep coipying and pasting! lol

Prophet.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 4:21pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/23 "2004-08-29T16:21:01Z")

</div>

most likly this is going to be used for cookies and it great break though for saving games.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 7:49pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/24 "2004-08-29T19:49:41Z")

</div>

aww, thank you so much! now i am a battery! :battery:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 9:14pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/25 "2004-08-29T21:14:37Z")

</div>

seems to me like this decoding program takes up a hell of a lot of resources such as memory/cpu… its only 25kb? why would it take up so much resources?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 9:36pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/26 "2004-08-29T21:36:12Z")

</div>

becuase it’s not a gradual task your asking you cpu to uncode the entire thing at that second. And i don’t see how its really taking up that of your cpu’s power. Theres a small steady jump of processing power (hit the button when your ctrl+alt+delete is up performace tab). Flash can only use a certain mount of ram so it stays steady (strait line) then it goes back down.  
Note: this could be bad if you were to have a lot of text incoded and try to decode it. Thats about it so.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 11:31pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/27 "2004-08-29T23:31:44Z")

</div>

> [@mdjstudios](#):
>
> aww, thank you so much! now i am a battery! :battery:

aww… look at the lil duracell! 😉  
lol no probs mate!

Prophet.

PS i used virusescu’s while loop 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 8:07am UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/28 "2004-08-30T08:07:04Z")

</div>

Prophet… or MjStudio I don’t quite understand.  
It’s working fine ore it’s really a pain for the processor that while loop? ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 10:50pm UTC](https://forum.kirupa.com/t/translating-letters-too-numbers/62355/29 "2004-08-30T22:50:47Z")

</div>

the while loop shouldnt be a problem… but try swapping it out for an IF statement instead only problem is that double spaces wont be translated… but of course, chances are if the user typed a double space then it was in error… normally i would say that its probably the idea of putting a loop within a loop is daunting for yourprocessor… but the while loop would only be run once or maybe twice so i dunno :S

try it…

Prophet.

[Previous page](https://forum.kirupa.com/t/translating-letters-too-numbers/62355.md?page=1)
