Help...letters to numbers

[FONT=Verdana][COLOR=Black]hey guys,
i need to make a program in flash in which you type in your name and it translates your name into numbers:
[/COLOR][/FONT] [FONT=Verdana][COLOR=Black]A|J|S = 1[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]B|K|T = 2[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]C|L|U = 3[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black] D|M|V = 4[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]E|N|W = 5[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]F|O|Y = 6[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]G|P|X = 7[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]H|Q|Z = 8[/COLOR][/FONT]
[FONT=Verdana][COLOR=Black]I|R = 9
and after translating i need to split the numbers into 3 sections…first i need to sum up all the constanants then i need to sum up the vowels and then sum up all of the letters…but i need to make it so that if the number goes higher then 78 it needs to go back down to 1; ex:79=1 80=2 81=3 etc etc

so summing up: you type in your name then after you click a button to submit your name it goes to a new keyframe that shows you all 3 summed up numbers…

is their any way to do this?
thx in advance
[/COLOR][/FONT]

can anyone help? this is really important

Have a look at fla.

Have a look at fla.

i love you…but theres only 1 thing… it doest go back to 0 when u put in a name that sums over 78

in the function “getTotalVal” [size=1](its the last one)[/size]

change:
[U]return totalVal;[/U]
with:
[U]return totalVal == 78 ? 78 : totalVal%78;[/U]

that’ll do the job :wink:

thx for da fix in code ninoscript

but… ok… new problem, i need to make it so the results are links, so the summed up numbers appear as links to a new frame… or better yet, the frame doesnt even have to show the math, it can just show the links…
the links will go to new frames that will each have a picture and a small phrase… or if anyone has any other ideas… i also thought of maybe makin 78 symbols with the 3 links on top and a space on the bottom to put the symbol of the picture and phrase, then everytime u click on a link the symbol will change and will show the other symbol, just an idea, if anyone has any other ideas im open to them

sorry bout this, but my mom just completly changed everything she said she wanted

ups, i found an error in my thing:
“return totalVal == 78 ? 78 : totalVal%78;”

if totalVal is for example 156 (78*2), it will show 0, not 78 :frowning:

new fix:
“return totalVal%78 == 0 ? 78 : totalVal%78;”

anyone have any ideas for my last problem??

Your last problem is fixed.

Have a gr8 day,
Satish.

no > 78, say 90 result is 12
no < 78, say 66 result is 66

Satish.