Which is the easiest way to achieve this

I want to make a binary number effect wich automatically changes the numbers sort of like the matrix effect, ok i know i can do this with mc but is it possible to achive it with some AS in a dynamic text field?? if so can anyone post how
Thanks

Grim

sure it is, but do you want it just to oscilate between 1,0,1,0,1,0,1,0… or have it random or ticker-like or what?

just 0 and 1 buddy any idea how i can do this?
thanks

Grim

saying just 1 and 0 doesnt cut it. With that I say, make a textfield and type 1 and 0 in it.

How do you want it to animate or react? What kind effect (specifically) are you trying to get?

here check this out this is what i mean but with just a text field and As is it possible?? http://www.flashkit.com/tutorials/Special_Effects/The_Matr-Kelly_Ma-152/index.php

Grim

this code about does it


width = 30;
lines = 15;
chance = 5;

// generate text to start
txt = ""
for (l=0;l*<*lines;l++){
	for (c=0;c*<*width;c++) txt += random(2);
	if (l*<*lines-1) txt += "
";
}
this.onEnterFrame = function(){
	orig = txt;
	txt = ""
	for (l=0;l*<*lines;l++){
		for (c=0;c*<*width;c++){
			if (!random(chance)) txt += random(2); // if 1 in chance, make random
			else txt += orig.charAt(l*(width+1)+c); // else keep orig
		}
		if (l*<*lines-1) txt += "
";
	}
}

uses a textfield in the scope which this text is placed with the var name “txt”. width is how many characters across, lines is how many lines tall. chance is the chance (1 in chance) that any given 0 or 1 will be randomized on an enterFrame.

Kirupa has some major problems when it comes to parsing "<"s in code tags

thanks sen i was hoping that with AS it would be much easier but it seems like a bit confusing ( for me ), another question since you know your flash stuff :smiley: wich book would you recommend for flash As since im not a great flash ASer, that explains AS codes and is understandable for your average joe thanks and sorry if i made you waste your time just thought it would be easier to do with As

Grim

dunno, never read any of the flash books

apparently AS the definitive guide is the best, hands down. I dont think the MX version is out yet (might be) if not wait for it. Good stuff no doubt.