Page 1 of 1

Slider and setValue

Posted: April 9th, 2009, 2:02 pm
by Foudou
Hiiii

Return with a new (minus) evil script problem.

I need for my script to setValue of Slider during the execution of the script.

I want to use slider value in order to "memorized" size of some text, calculated during the script execution.

Code: Select all

		NewL = Math.floor(Math.abs(myVertices[0][0]-myVertices[3][0]));
		NewH = Math.floor(Math.abs(myVertices[0][1]-myVertices[1][1]));

		Largeur = myText.Effects.addProperty("Paramètre glissière");
		Largeur.name = "Largeur";
		this solution //myText.effect("Largeur")("Curseur").value = NewL
		
		Hauteur = myText.Effects.addProperty("Paramètre glissière");
		Hauteur.name = "Hauteur";
		an other technique //myText.property(1).setValue(NewH);
Maybe it's impossible, but i think that's i've just made some mistakes.

Thanks.

Re: Slider and setValue

Posted: April 9th, 2009, 4:00 pm
by Yenaphe
For our non french friends, i'd like to add that "Paramètre glissière" is our translated version of "slider".

Re: Slider and setValue

Posted: April 10th, 2009, 12:36 am
by kobyg
Hi,
Try this:

Code: Select all

NewL = Math.floor(Math.abs(myVertices[0][0]-myVertices[3][0]));
NewH = Math.floor(Math.abs(myVertices[0][1]-myVertices[1][1]));

Largeur = myText.Effects.addProperty("Paramètre glissière");
Largeur.name = "Largeur";
myText.effect("Largeur")("Curseur").setValue(NewL);
      
Hauteur = myText.Effects.addProperty("Paramètre glissière");
Hauteur.name = "Hauteur";
myText.effect("Hauteur")("Curseur").setValue(NewH);
I hope I guessed the french translation correctly...
Anyway, in English it should be:

Code: Select all

Largeur = myText.Effects.addProperty("Slider Control");
Largeur.name = "Largeur";
myText.effect("Largeur")("Slider").setValue(NewL);
Koby.

Re: Slider and setValue

Posted: April 10th, 2009, 1:04 am
by Foudou
I will try this tonight. This is morning for me in France.

And thanks to Yenaphe for the missing translation.
We are few, but yes, it's not a legend, some people use After Effects in French.

If it works i will send you a nice shot of video and code!

Thanks for all...if it works! :wink:

Re: Slider and setValue

Posted: April 11th, 2009, 12:42 pm
by Foudou
It works!!!

I have understand my mistake.

Thanks again!