Jump to content

tiscavalcanti

Members
  • Content Count

    46
  • Joined

  • Last visited

Everything posted by tiscavalcanti

  1. footage = comp("Footage").layer(1); IP = footage.inPoint; OP = footage.outPoint; IP+time%(OP-IP); I got it!
  2. Your information is quite useful, I will delve into the links, and in fact, I use video program that uses expressions based on JS ... Look, I just figured out a way to sort this out ... maybe it'll work ... Do you know how I can make a variable go from 0 to 22, and when it reaches 22, return to 0? Type a slide inside the number 22, that is, from 0 to 22, it results in 22, and from 22 to 44 it also results in 22, as if the variable was reset every time it was 22, then 23 would be 1 , and 45, 1 also, and so on.
  3. I need to make a code like this: Initial value 11 Final value 33 I want to insert the code on the property time (that changes) of the program I use So I want the code to interpolate through the time between numbers 11 and 33, meaning this code will move 22 seconds in time I want that when the code results in the final value, that is, arrive at the value 33 It is reinitiated, thus causing an infinite loop. Going from 11 to 33 in 22 seconds and then repeating on and on. There is a codebase that may allow time to be used in a dynamic way: linear (t, tMin, tMax,
  4. Thanks for your time, my friend. This forum like ever, very efficient. Work very well.
  5. I want the value of a property of my program, to which this code is entered, is defined by the value of another property that is between two other properties, ie three properties, I do not even want Math.max or Math. min, but the value is between these two.
  6. Thanks, but I believe which Math.median() don't work in After Effects Software by expression. I get a error ("Math.median is not a function"). I could use if/else but, in my case, the values are not fixed, this value that I show is just example. How i can do this between if/else?
  7. I want to get the value that is in the center between three values. For example: Math."middle"(34.78, 56.12, 45.54) Result in: 45.54 How I can do this?
  8. I want a code which switch a property, that is, toggle between two fixed values; (Checkbox - 1 or 0) If a determined condition is true. For example: a = 1; b = 2; if (a > "CheckBox switch for 1 (if was at 0) or switch for 0 (if was at 1)"; else 0; If "ELSE" is satisfied, and get back to "IF" satisfied; The Checkbox will be with the inverse value of what was before "ELSE". That's what I want. In another example. I will create a situation, step by step: Checkbox is at 0. "IF" is satisfied. Checkbox is at 1. "ELSE" is satisfied. Checkbox is at 0 ("ELSE" always is 0).
  9. I want to know, if is there any way to javascript change (switch) between two values (1 and 0) in a Checkbox, A code without resulting in a fixed value, its function becomes only toggle value. For example, I need put this in a Property: if (thisComp.layer("Logo").transform.opacity==100) "My Checkbox" (switch) else 0; After Effects Expression
  10. This way is interesting: return (yB <xA)? [yB, yB]: [xA, xA]; Could you explain a little more how it works. The use of interrogation, is something new to me.
  11. Really, thanks for all, justsomeguy davej Ingolme In fact, I wanted to know different ways of dealing with conditions a little more complex. You all helped me realize how many ways I can do the same thing, that's what I needed really. I expressed myself badly. Thanks again!
  12. I can do this: function getValue() { switch (true) { case yB < xA: return [yB, yB]; default: return [xA, xA]; } } E = getValue(); if (w > maxWidth || h > textHeight){ x = E[0]; y = E[1]; } [x, y];
  13. And something like "switch(true)" work? If not, could edit this code for me, in If/Else same, of a better way? Thanks!
  14. Hello, I have created this code: if (w > maxWidth || h > textHeight) { if (y < x) { [y, y] } else { [x, x] } } else { [value[0], value[1]] } It is a piece, but it gives to understand what I want to optimize without the rest. How to modify this code to work with: Switch Statement instead If/Else mode? This is a expression of After Effects. Thanks.
  15. Ok. Good. I needed use a Array in final of code, because After Effects require it. My code was practically perfect. I'm going to change only a few details. Thank you very much!
  16. How to use a "case" statement with two "conditons"? For example: switch(b) {"case 1 or 4:" } Thanks.
  17. Oh, yeah! Thank you very much, help me a lot! This code is my result after many tries, and finally I got it. And with your instructions, will stay very best.
  18. This is it. I'm able, finally. Thanks for your time! w=1920;h=1080;p = [".95", ".90", ".85",".05", ".10",".15"];x=0;y=0;b=3;c=3;function xyFinal(){ function variable(x,y){ if(b==1){ return [x*p[3],y*p[0]]; }else if(b==2){ return [x*p[4],y*p[1]]; }else if(b==3){ return [x*p[5],y*p[2]]; } } var o=variable(w,h); if(c==1){ return o; }else if(c==2){ return [w/2,o[1]]; }else if(c==3){
×
×
  • Create New...