Return-Path: Received: from atl4mhob14.myregisteredsite.com ([209.17.115.52] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 4946549 for AE-List@media-motion.tv; Thu, 10 Jan 2013 19:47:22 +0100 Received: from mailpod.hostingplatform.com (mail.networksolutionsemail.com [205.178.146.50]) by atl4mhob14.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id r0AIqP11016042 for ; Thu, 10 Jan 2013 13:52:25 -0500 Received: (qmail 23878 invoked by uid 0); 10 Jan 2013 18:52:24 -0000 Received: from unknown (HELO ?10.245.140.133?) (torno@sydefxink.com@174.254.53.201) by 0 with ESMTPA; 10 Jan 2013 18:52:24 -0000 Subject: Re: [AE] Script Question References: From: David Torno Content-Type: multipart/alternative; boundary=Apple-Mail-E6242F15-D49B-483E-B5BA-23AB8C076A00 X-Mailer: iPhone Mail (9B176) In-Reply-To: Message-Id: <03608EB8-2FF1-4021-A9C1-677966F859B8@sydefxink.com> Date: Thu, 10 Jan 2013 10:52:21 -0800 To: After Effects Mail List Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) --Apple-Mail-E6242F15-D49B-483E-B5BA-23AB8C076A00 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Ok, then my guess is that the "(1)" index you use probably needs to be 1 for= the first slider and 2 for the second. Instead of 1 and 1. I think it's ove= rwriting the previous one. I'll be in the office soon, so I'll try and test a setup to better comprehen= d the code needed. David Torno Visual Effects Artist & Supervisor http://www.ghosttownmedia.com O: 213.739.2290 C: 818.391.6060 --------------------- http://www.sydefxink.com http://aeioweyou.blogspot.com http://mactex.blogspot.com "The most useless day is that in which we do not laugh" -Charles Field On Jan 10, 2013, at 8:14 AM, Phil Spitler wrote: > Yup 2 sliders to the same layer.=20 >=20 >=20 > Phil >=20 >=20 >=20 > Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394.82= 00 | c : 415.571.3139 | Bonfirelabs.com >=20 > "Get Social" - http://www.facebook.com/bonfirelabs >=20 > On Jan 9, 2013, at 11:33 PM, David Torno wrote: >=20 >> Wait I just realized something, are you adding two sliders to the same la= yer? >>=20 >> David Torno >> Visual Effects Artist & Supervisor >> http://www.ghosttownmedia.com >> O: 213.739.2290 >> C: 818.391.6060 >> --------------------- >> http://www.sydefxink.com >> http://aeioweyou.blogspot.com >> http://mactex.blogspot.com >>=20 >> "The most useless day is that in which we do not laugh" >> -Charles Field >>=20 >> On Jan 9, 2013, at 11:02 PM, Phil Spitler wrote: >>=20 >>> I'm having a fun time figuring out a scripting problem and thought I wou= ld ask the advice of the script gurus on the list. >>>=20 >>> Basically I want to add 2 sliders then get the value of those sliders. >>>=20 >>> var RED_Slider =3D selectedLayer.Effects.addProperty("Slider Contro= l"); >>> var red =3D RED_Slider(1).value; >>>=20 >>> var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider Cont= rol"); >>> var green =3D GREEN_Slider(1).value; >>>=20 >>> If I run the code above, it works great however if I change the order an= d assign the sliders first then try to get the value, AE gives me an "invali= d object" error. >>>=20 >>> So the code below will not work. >>>=20 >>> var RED_Slider =3D selectedLayer.Effects.addProperty("Slider Contro= l"); >>> var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider Cont= rol"); >>>=20 >>> var red =3D RED_Slider(1).value; >>> var green =3D GREEN_Slider(1).value; >>>=20 >>>=20 >>> It's almost as if when I add the Green Slider, it forgets the Red Slider= . >>>=20 >>> Any ideas? >>>=20 >>> Cheers. >>>=20 >>> Phil >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>> Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394= .8200 m : 415.571.3139 >>>=20 >>> Website | Facebook | LinkedIn >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 --Apple-Mail-E6242F15-D49B-483E-B5BA-23AB8C076A00 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Ok, then my guess is that t= he "(1)" index you use probably needs to be 1 for the first slider and 2 for= the second. Instead of 1 and 1. I think it's overwriting the previous one.<= /div>

I'll be in the office soon, so I'll try and test a s= etup to better comprehend the code needed.

David Torno
Visual Eff= ects Artist & Supervisor
O: 213.739.2290
C= : 818.391.6060
---------------------
http://aeioweyou.blogspot.com

"The most useless day is that in which we do not laugh"
-Charle= s Field

On Jan 10, 2013, at 8:14 AM, Phil Spitler <phil@bonfirelabs.com> wrote:
Yup 2 sliders to the s= ame layer. 


Phil

=


Phil Spitler |  Creative Technologis= t  |  Bonfire  Labs  |  t : 415.394.8200  | &n= bsp;c : 415.571.3139  |  Bonfir= elabs.com


On Jan 9, 2013, at 11:33 PM, David Torno <torno@sydefxink.com> wrote:

Wait I just realized something, are you adding two= sliders to the same layer?

David Torno
Visual Effects Artist &am= p; Supervisor
O: 213.739.2290
C: 818.391.6060<= /div>
---------------------
http://aeioweyou.blogspot.com

"The most us= eless day is that in which we do not laugh"
-Charles Field

On Jan 9, 2013, at 11:02 PM, Phil Spitler <phil@bonfirelabs.com> wrote:

I'm having a fun time figuring out a s= cripting problem and thought I would ask the advice of the script gurus on t= he list.

Basically I want to add 2 sliders then get the v= alue of those sliders.

var RED_Slider =3D selectedLayer.Eff= ects.addProperty("Slider Control");
var red =3D RED_Slider(1).va= lue;

var GREEN_Slider =3D selectedLayer.Effects.a= ddProperty("Slider Control");
var green =3D GREEN_Slider(1).value;=

If I run the code above, it works grea= t however if I change the order and assign the sliders first then try to get= the value, AE gives me an "invalid object" error.

= So the code below will not work.

var RED_Slider =3D s= electedLayer.Effects.addProperty("Slider Control");
var GREEN_Sl= ider =3D selectedLayer.Effects.addProperty("Slider Control");

var red =3D RED_Slider(1).value;
var green =3D= GREEN_Slider(1).value;


It's almost as if when I add the Green Slider, it forgets the Red Slid= er.

Any ideas?

Cheers.

Phil





Phil Spitler  |  Creative Technologist   |  Bonfire Labs  |  t : 415.394.8200  m : 415.571.3139

Website | Facebook | LinkedIn

=







= --Apple-Mail-E6242F15-D49B-483E-B5BA-23AB8C076A00--