View Full Version : Matrix effect
bellaroma
May 20th, 2002, 02:20 PM
I followed the tutorial for the Matrix Bitstream Effect here -
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?
Thank you very much.
upuaut8
May 20th, 2002, 04:49 PM
not without seeing your FLA.
my email is upuaut@centerspin.com if you want to send it to me. Wait until tonight though, my mail server seems to be down right now.
I am not Jubba
May 20th, 2002, 08:37 PM
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 je****1@binghamton.edu
kitiara30
May 21st, 2002, 07:29 AM
What is it with this Matrix effect thing? Is everyone using it except me???
ilyaslamasse
May 21st, 2002, 02:28 PM
No harm intended, but it looks kinda ugly, doesn't it ?
pom 0]
I am not Jubba
May 21st, 2002, 04:22 PM
yeah it does. But i was trying it for some reason or another...just another path in my never ending journey for knowledge
bellaroma
May 21st, 2002, 06:34 PM
Thanks for your kind offers; the fla is on the way!
I am not Jubba
May 21st, 2002, 07:38 PM
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.
Click here (http://www10.brinkster.com/jubbaorf/matrix.html)
<embed src="http://www10.brinkster.com/jubbaorf/matrix.swf" height=200 width=200></embed>
bellaroma
May 22nd, 2002, 08:02 AM
Thank you so much, jubba.
j0se
May 24th, 2002, 01:53 AM
i also tried the tutorial and found that it didn't work.
you've really simplified it for us- thanks
:)
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?)
and if the code was: index = random(3) would that bring into play the values 0,1 & 2?
just curious
thanks
===
index = random(2)//this assigns the variable "index" a random value (either 1 or 0)
if(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
gotoAndPlay(1) //sends it ahead to play the "0" next
}else{
gotoAndPlay(7) //sends it back to play the "1" again
}
upuaut8
May 24th, 2002, 02:10 AM
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?)
yes. 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);
and if the code was: index = random(3) would that bring into play the values 0,1 & 2?
yes again. The function "random();" produces a random number between 0 and one less than the arguement number (the one in parenthesis).
preferable still for a couple of reasons is the math method random.
Math.random(); //produces a result from 0 to 1 in four digit notation. ie .1482 might be produced by Math.random();
it's a little longer to write, but it produces a better random number. It is used a little differently though.
Math.random()*99+1;
produces a result between 1 and 100 in four digit notation.
If I were going to do the same thing as the above example, needing either 0 or 1 I would use this.
Math.round(Math.random());
which would produce either a 0 or a 1.
It's really just personal choice. The Math.random produces a more random number that's all.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.