Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Expression Control / Slider Control work with percentage?

Engaged ,
Feb 09, 2015 Feb 09, 2015

For example, I want to make one expression with keyframes, so opted to use "slide control," but the expression is now defined by the "slide control ", if I put the expression wiggle(2,5) and place the 2 on the slide control, know that the value will be replaced by the value of "slide control" if in case the slide control was "10", would look like this: wiggle(10,5)

But what I want to know is if have how to control the original expression through a percentage and not a replaced, for the slider control value.

Thanks!

TOPICS
Expressions
6.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 09, 2015 Feb 09, 2015

If your max value amount is set, then creating the slider to drive the percentage of that number requires some simple math.

How accurate you want your percentage slider to be would require a little modification to that math.

This example lets you animate a percentage of "2" (maximum value) frequency in the wiggle, but lets the amplitude stay at "5":

mv=2; //maximum value

perc= (effect("Slider Control")("Slider")/100);  // makes a percentage value from the slider using 0-100

wiggle(mv*perc,5)

explanati

...
Translate
Community Expert ,
Feb 09, 2015 Feb 09, 2015

If your max value amount is set, then creating the slider to drive the percentage of that number requires some simple math.

How accurate you want your percentage slider to be would require a little modification to that math.

This example lets you animate a percentage of "2" (maximum value) frequency in the wiggle, but lets the amplitude stay at "5":

mv=2; //maximum value

perc= (effect("Slider Control")("Slider")/100);  // makes a percentage value from the slider using 0-100

wiggle(mv*perc,5)

explanation:

There are many ways to do this.

The slider is limitless, so you might want to set some ADDITIONAL rules in your expression, but to keep this simple:

You have to multiply your maximum value by your "perc". 

However, we want to turn the "perc" number into a fraction. 

An easy way is to divide the slider amount by 100. 

Multiply your max value with the result of your (slider/100) and you have your percentage.

(*You could use fractional numbers to animate instead of this, but the slider is easier to control this way.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 10, 2015 Feb 10, 2015

Amazing!

Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 10, 2015 Feb 10, 2015

Can you give me more a little help?

How do I apply it to this expression?

temp = content("Rectangle 1").content("Rectangle Path 1").size[0];

[temp, 0]

This expression is the anchor point.

That are following the size of a shape.

I want the slide control, control the size of the shape in percentage.

See image.

Adobe.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2015 Feb 10, 2015

Shape layers are unique because there are several places you can control transformation (and anchor point).

Moving the anchor point of the LAYER value is going to give you different opportunities than moving the anchor point of the Rectangle (contents object)

The benefit of a Shape Layer is that it is continuously rasterizing.

You may need to consider what you need to do with this first (why expression).

Perhaps a simple scale value is all you need

BUT:

Here are two options

USING PERCENTAGE SLIDER

using_percentage_slider.jpg

USE SCALE WITHIN THE SHAPE

justusescale.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 10, 2015 Feb 10, 2015
LATEST

Amazing!

You are very intelligent!

I did it!

Thank You so Much!

See:

Amazing.png

It's because I'm creating a template, now makes it easy for the person to edit.

Why is the word changes size, so I want the word never to leave the image composition.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines