AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sat May 25, 2013 2:54 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Random ones and zeros
PostPosted: Thu Nov 20, 2008 4:24 pm 
Offline

Joined: Tue Feb 27, 2007 8:45 am
Posts: 14
Is there a simple expression (or not so simple) that randomly changes a string of ones and zeros back and forth? I've seen a few articles that sort of explain this, but they're much more involved than I need.


Top
 Profile  
 
 Post subject: Re: Random ones and zeros
PostPosted: Fri Nov 21, 2008 6:41 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
Isn't there an animation preset for doing that with text?

_________________
"Up And Atom

No...No

Up And At Them!"


Top
 Profile  
 
 Post subject: Re: Random ones and zeros
PostPosted: Fri Nov 21, 2008 8:34 am 
Offline

Joined: Tue Feb 27, 2007 8:45 am
Posts: 14
I looked, but wasn't able to find one.


Top
 Profile  
 
 Post subject: Re: Random ones and zeros
PostPosted: Fri Nov 21, 2008 8:52 am 
Offline

Joined: Tue Feb 27, 2007 8:45 am
Posts: 14
Thanks Atomic, but I've finally found a solution on the Creative Cow forum:
http://forums.creativecow.net/readpost/2/930650
Thanks to Darby Edelen.


Top
 Profile  
 
 Post subject: Re: Random ones and zeros
PostPosted: Fri Nov 21, 2008 9:00 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 646
Location: London, UK
I tried making a text layer with a row of zeros, adding a Wiggly selector and setting the Character Offset to 1, but this caused the numbers to switch between 0,1 and 9.
EDIT: As explained in the Creative Cow post mentioned above, you need to change the Min Amount value from -100 to 0 for this to work.

Alternatively, here's an expression you can apply to a text layer's Source Text property:
Code:
framesPerSecond = 25;
numberOfCharacters = 10;

posterizeTime(framesPerSecond);
result = "";
for (x=1; x <= numberOfCharacters; x++) {
   result += Math.round(random(0,1));
}
result;


Top
 Profile  
 
 Post subject: Re: Random ones and zeros
PostPosted: Fri Nov 21, 2008 9:09 am 
Offline

Joined: Tue Feb 27, 2007 8:45 am
Posts: 14
Thanks. That seems to work real well, too.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group