Saturday, July 29, 2006

Lesson 3: Value

In this lesson, we are going to explore the term value.

In short, value returns (or "gives you") the current value of whatever parameter which with you are working.

So, if we were to use the following expression on opacity:

value + 5

The opacity is still modifiable, because the expression is getting the current value of the parameter as is, and then adding 5 to it. value always leaves your parameter modifiable, but with the ability to combine different calculations with it.

For example, using our simple Opacity scenario, try adding the following expression:

This will result in opacity gradually increasing the opacity over time. But unlike before, you'll notice that we can now modify the value of Opacity. Why is that?

The term value is the current parameter value, as is. This we can change as we please. To this, we add the time.

If we only used the term time, opacity would increase by 1 for every 1 second that passes in the composition, and we would not be able to change the value

So, for an example, let say we wanted to create a name banner that we can move around as we please, but still had movement of its own generated with expressions.. value would allow this flexibility.

Remember my awesome train drawing?


value, when used with an array will have multiple values. To work with these values, we need to specify what value we want. The way we do this is with the [0], [1], etc. Don't forget that it is ZERO that is the first number, not one. So what we would call the first value would be:


Second value would be:


And so forth.

So, considering the following example, try to predict what would happen.

The X value is free to roam. We can change that to whatever we want, but Y is fixed. So, we've constrained the movement of this object to the X axis.

t is an increasing value equal to time multiplied by 50.

x is still modifiable, with value[0], but it is increasing because we are adding t and makes the solid move from left to right across the screen.

y is still locked in at 200.

Notice the semicolons. If you aren't sure when to add a semicolon, add a semicolon. It's just a Javascript thing, and you'll never do any harm in adding a semicolon at the end of a line.

How would we get this to stop at a value? That gets into checking our values with an if/else statement which we will do next time.

Also, some suggested reading:

Dan Ebbert's explanation of Array math

I could spend hours coming up with an explanation of array math and not do as good a job as Mr. Ebberts. You'll notice some new things like position[0] which I haven't described. I wanted to start with value first, as it is more universal and requires fewer terms for you to remember. In short, value[0] on position is exactly the same as postion[0]. We'll get to that next time.


Blogger jerry247 said...

Keep it up, I'm learning more in the last 4 posts than I did in a 3 unit class in college! Linked to my blog

8:14 AM  
Blogger karan said...

thanks a lot for making this easier for us.i have tried learning scripting earlier from other sites which made me think that scripting is not for me...thnx to u,u made it easier..

5:43 PM  
Blogger Ruben said...

Yes this is really helpfull. I'm not a scripter, but a motiondesigner and expressions are really helpfull getting faster to what you want. So thank you for explaining that simple.

3:26 AM  
Blogger arun said...

Man you Rock!

Am doing video tutorials on AE Scripts. I need your permission to share some of your informations in my video tuts.

You can check out my AE Scripts video tutorials at

1:48 AM  
Blogger Peter Luna said...

Essay forming is most basic in school life of every understudy. The understudy needs to do distinct examination on the subject that they picked. Nevertheless, it is unreasonable by an understudy. If anyone gets weakness while doing the paper contact top essay writing service. There you get best course of action.

11:04 PM  
Blogger sindhu said...

Excellent and very cool idea and the subject at the top of magnificence and I am happy to this post..Interesting post! Thanks for writing it. What's wrong with this kind of post exactly? It follows your previous guideline for post length as well as clarity..

CRO Agency in Chennai

2:34 AM  
Blogger Sono Adney said...

You make it entertaining and you still manage to keep it up great.

Free Apk Store

2:09 PM  
Blogger Kevin Peter said...

Thanks for this great post i like this post very much. It is good Website Designer. best international education & immigration consultant in jalandhar

9:15 PM  
Blogger Words Doctorate said...

Thank you for sharing such a informative information with us. Keep on sharing the blog like this.

PhD Thesis Writing Services
Dissertation Writing Services
Research Paper Writing Services
Master Thesis Writing Services

11:48 PM  
Blogger hari andro said...

I am regular visitor of this blog .I am working as blog reviewer in a private press and I saw many useful posts here. Sure, I will give best ratings for this blog .Keep posting best posts like this to get top reviews and ratings from blog reviewers and people .And I am thankful for this valuable post.
Engineering Colleges in Chennai | Mechanical Colleges in Chennai | ECE Colleges in Chennai

10:00 PM  
Blogger Alex Milner said...

Expressions usually have different meanings and it is usually good for everybody to learn about expression. The after-effect expressions show the cause of a phenomenon and help the viewers to understand the situation. This is a very educative blog and it actually carries information with a lot of impacts. Keyword Research Service

2:02 AM  
Blogger Albert Smith said...

Wow, after reading this article I can proudly say that I am knowledgeable on the subject of value return. Additionally, the article is very short hence the reader does not strain to finish reading it. I hope this information will reach out to a lot of online users so that they can improve their value. Consequently, students can increase their academic value by clicking on Well Referenced to access our writing services.

4:45 AM  
Blogger Nikisha mathi said...

It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.
Seo Company in Chennai
Web design company in chennai
Digital Marketing Company in Chennai

12:43 AM  
Blogger Ancy merina said...

This post contains relevant information about web development services. All the points mentioned in this post are essential for a good web development. Nice Post!!
website developers in Bangalore | website designers in bangalore

1:17 AM  

Post a Comment

<< Home