# Matrix effect

**URL:** https://forum.kirupa.com/t/matrix-effect/2613
**Category:** flash
**Created:** [May 20, 2002, 6:20pm UTC](https://forum.kirupa.com/t/matrix-effect/2613 "2002-05-20T18:20:48Z")
**Posts on this page:** 11
**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: [May 20, 2002, 6:20pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/1 "2002-05-20T18:20:48Z")

</div>

I followed the tutorial for the Matrix Bitstream Effect here -\r[flashkit.com/tutorials/Sp…ndex.shtml](http://flashkit.com/tutorials/Special_Effects/The_Matr-Kelly_Ma-152/index.shtml) - like a slave, downloaded her code and compared, and I still can’t see why my matrix will not become random. I put a bunch of copies of the movie clip of the “random” 0s and 1s on Scene 1, and they all slavishly turn to 1s and 0s at the same time, no randomness. Can anyone tell me what I’m doing wrong?\rThank you very much.

---

<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: [May 20, 2002, 8:49pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/2 "2002-05-20T20:49:43Z")

</div>

not without seeing your FLA.\r\rmy email is [upuaut@centerspin.com](mailto:upuaut@centerspin.com) if you want to send it to me. Wait until tonight though, my mail server seems to be down right now.

---

<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: [May 21, 2002, 12:37am UTC](https://forum.kirupa.com/t/matrix-effect/2613/3 "2002-05-21T00:37:45Z")

</div>

that tutorial is not very difficult, however it doesnt explain anything. make sure that you followed every step and it should work. if you want to e-mail it to me too [jedick1@binghamton.edu](mailto:jedick1@binghamton.edu)

---

<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: [May 21, 2002, 11:29am UTC](https://forum.kirupa.com/t/matrix-effect/2613/4 "2002-05-21T11:29:05Z")

</div>

What is it with this Matrix effect thing? Is everyone using it except me???

---

<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: [May 21, 2002, 6:28pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/5 "2002-05-21T18:28:01Z")

</div>

No harm intended, but it looks kinda ugly, doesn’t it ?\r\rpom 0]

---

<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: [May 21, 2002, 8:22pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/6 "2002-05-21T20:22:27Z")

</div>

yeah it does. But i was trying it for some reason or another…just another path in my never ending journey for knowledge

---

<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: [May 21, 2002, 10:34pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/7 "2002-05-21T22:34:29Z")

</div>

Thanks for your kind offers; the fla is on the way!

---

<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: [May 21, 2002, 11:38pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/8 "2002-05-21T23:38:21Z")

</div>

ok, I hope you check this before you check your e-mail. I can’t e-mail out from that address unless I open a browser and some stupid login stuff, but anyhow. The way that this code is written is kind of stupid anyway…its not your code…its the code in the tutorial. go here and check out the file I made, hopefully it will answer your question, and the code has all the explanation.\r\r[Click here](http://www10.brinkster.com/jubbaorf/matrix.html)\r\r\<embed src=“[http://www10.brinkster.com/jubbaorf/matrix.swf](http://www10.brinkster.com/jubbaorf/matrix.swf)” height=200 width=200\>\</embed\>

---

<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: [May 22, 2002, 12:02pm UTC](https://forum.kirupa.com/t/matrix-effect/2613/9 "2002-05-22T12:02:58Z")

</div>

Thank you so much, jubba.

---

<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: [May 24, 2002, 5:53am UTC](https://forum.kirupa.com/t/matrix-effect/2613/10 "2002-05-24T05:53:25Z")

</div>

i also tried the tutorial and found that it didn’t work.\r\ryou’ve really simplified it for us- thanks\r:)\r\rcan i just ask: in your code (below), you name a variable ‘index’. how does the variable get it’s value? (from the random function?)\r\rand if the code was: index = random(3) would that bring into play the values 0,1 & 2?\r\rjust curious\rthanks\r\r===\rindex = random(2)//this assigns the variable “index” a random value (either 1 or 0)\rif(index == 0){ //this if statement checks to see if “index = 0” and if so, sends it on to the next number, or sends it back\r gotoAndPlay(1) //sends it ahead to play the “0” next\r}else{\r gotoAndPlay(7) //sends it back to play the “1” again\r}

---

<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: [May 24, 2002, 6:10am UTC](https://forum.kirupa.com/t/matrix-effect/2613/11 "2002-05-24T06:10:11Z")

</div>

> can i just ask: in your code (below), you name a variable ‘index’. how does the variable get it’s value? (from the random function?)  
> \ryes. declaring a variable on the left of an equal sign makes it equal to whatever the completed mathmatics are behind everything on the right of the equal sign. In this case random(2);\r\r  
> and if the code was: index = random(3) would that bring into play the values 0,1 & 2?  
> \r\ryes again. The function “random();” produces a random number between 0 and one less than the arguement number (the one in parenthesis).\r\rpreferable still for a couple of reasons is the math method random.\r\rMath.random(); //produces a result from 0 to 1 in four digit notation. ie .1482 might be produced by Math.random();\r\rit’s a little longer to write, but it produces a better random number. It is used a little differently though.\r\rMath.random()\*99+1;\r\rproduces a result between 1 and 100 in four digit notation.\r\rIf I were going to do the same thing as the above example, needing either 0 or 1 I would use this.\rMath.round(Math.random());\rwhich would produce either a 0 or a 1.\r\rIt’s really just personal choice. The Math.random produces a more random number that’s all.
