Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / April 2005



Tip: Looking for answers? Try searching our database.

1=a 2=b 3=c....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tommytomthms5 - 29 Apr 2005 17:58 GMT
i want to randomly genorate letters from numbers i figured it would be easy with

if (count == 1, true) {
    count = a;
}

then repeat for the rest of the alphabet but it doesnt work it returns in the
txt box "UNDEF"

please fix and please i already know i spell bad
ClauÐio - Flash Developer - www.websigns.com.ar - - 29 Apr 2005 18:12 GMT
well, the a value should be between ""...  count="a"; else the script
think the a is a varibable name...

i think u should have to use another variable name and not always
count.

if(count==1) {
  value="a";
}
David Stiller - 29 Apr 2005 19:46 GMT
tommytomthms5,

> i want to randomly genorate letters from numbers i figured it
> would be easy with
>
> if (count == 1, true) {
>  count = a;
> }

   That approach won't be successful, since that isn't how an if()
statement works.

> then repeat for the rest of the alphabet but it doesnt work it
> returns in the txt box "UNDEF"

   I'm not clear, actually, what you're trying to do.  You want to randomly
generate letters, sure, what what does that mean?  Do they need to be all
uppercase, all lowercase, mixed?  Is it okay if some letters repeat?  Do you
need these letters in an array, a text box, or what?

> please fix and please i already know i spell bad

   I'll be happy to help, but you'll have to spell out what you're hoping
to accomplish.

David
stiller (at) quip (dot) net
"Luck is the residue of good design."
tralfaz - 30 Apr 2005 19:14 GMT
>i want to randomly genorate letters from numbers i figured it would
>be easy with
[quoted text clipped - 8 lines]
>
> please fix and please i already know i spell bad

r = Math.floor(random(27)); // zero to 26

BigLetter = String.fromCharCode(r + 65); // A to Z
SmallLetter = String.fromCharCode(r + 97); // a to z

tralfaz
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.