# Random cycling by Thoriphes

**URL:** <https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757>\
**Category:** Uncategorized\
**Created:** [September 28, 2001, 1:22pm UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757 "2001-09-28T13:22:10Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [September 28, 2001, 1:22pm UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757/1 "2001-09-28T13:22:10Z")

</div>

Thanks for the Fla. but I am not able to get it to do numbers, only letters! Any ideas to solve this problem?

---

<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:** [October 1, 2001, 10:20am UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757/2 "2001-10-01T10:20:17Z")

</div>

you have to change the range of the chr() values. or actually, i’m stupid, just use a random number generator. and don’t forget to change the dynamic text options to choose numbers (the button that looks like 123).

---

<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:** [October 1, 2001, 12:54pm UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757/3 "2001-10-01T12:54:23Z")

</div>

No, no, I’m stupid. Um… what is a random number generator??

---

<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:** [October 1, 2001, 1:17pm UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757/4 "2001-10-01T13:17:08Z")

</div>

well, you kinda have to elaborate a lil. there is a function called “random()” where you insert a number and it chooses a number randomly between 0 and the number before the number you put in. it’s in my code

---

<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:** [October 2, 2001, 2:40pm UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757/5 "2001-10-02T14:40:34Z")

</div>

i dunno if this is what you meant but you can see a couple of random numbers cycling in my footer below. i just modified the random letter cycling tutorial found in this site. i replaced the following lines:

onClipEvent (enterFrame) {  
if (go) {  
x = random(122);  
if ((x\>=65) and (x\<=122)) {  
this.letter2 = chr(x);  
}  
if (x == 65) {  
go = false;  
}  
}

with these lines:

onClipEvent (enterFrame) {  
if (go) {  
x = random(10);  
this.number2 = x;  
}  
}

p.s.  
thanks to thoriphes for the original code.

---

<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:** [October 2, 2001, 7:08pm UTC](https://forum.kirupa.com/t/random-cycling-by-thoriphes/3757/6 "2001-10-02T19:08:47Z")

</div>

Thanks, both your comments are helpful. Cool intro on your site Sidky.
