AE ENHANCERS

Expressions/Scripts/Presets
It is currently Wed May 22, 2013 9:27 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Clock hands
PostPosted: Wed Sep 13, 2006 5:20 pm 
Offline

Joined: Tue Sep 12, 2006 9:46 pm
Posts: 2
Just put this code on some clock hands, initially pointing north (12 o'clock). You can change the start time with "forwardtime".

Hours

Code:
forwardtime = 10;
starttime = time+(forwardtime*3600);
h =starttime/3600;
s = Math.floor(h);
s2 = h-s;
if (s2 > 0.99){
   transform.rotation = (Math.floor(h)*30)+((s2-0.99)*(1/0.01)*30);
}else{
   transform.rotation = Math.floor(h)*30;
}


Minutes

Code:
forwardtime = 11;
starttime = time+(forwardtime*60);
m = starttime/60;
s = Math.floor(m);
s2 = m-s;
if (s2 > 0.9){
   transform.rotation = (Math.floor(m)*6)+((s2-0.9)*(1/0.1)*6);
}else{
   transform.rotation = Math.floor(m)*6;
}


Seconds

Code:
timer = time+23;
s = Math.floor(timer);
s2 = timer-s;
if (s2 > 0.7){
   transform.rotation = (Math.floor(timer)*6)+((s2-0.7)*(1/0.3)*6);
}else{
   transform.rotation = Math.floor(timer)*6;
}


Top
 Profile  
 
 Post subject: Transform?
PostPosted: Tue Nov 28, 2006 12:35 pm 
Offline

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 3
Location: NYC
What is the use of the "transform" property? Is that an After Effects 7 thing?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 2:03 pm 
Offline

Joined: Sat Jun 26, 2004 10:01 am
Posts: 298
Location: Folsom, CA
Yes it is. You also get it with the pick whip and the default expression.

Dan

_________________
http://www.motionscript.com


Top
 Profile  
 
 Post subject: AF rejects expression
PostPosted: Sat Feb 03, 2007 11:37 am 
Offline

Joined: Fri Feb 02, 2007 9:30 pm
Posts: 5
When trying to use any of these expression texts, I get the message:

"Expression result must be of dimension 2, not 1. Expression disabled."

Any ideas? Thanks.


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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