Return-Path: Received: from mail-pa0-f47.google.com ([209.85.220.47] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4946395 for AE-List@media-motion.tv; Thu, 10 Jan 2013 17:09:09 +0100 Received: by mail-pa0-f47.google.com with SMTP id fa10so442511pad.34 for ; Thu, 10 Jan 2013 08:14:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:references:from:content-type:x-mailer :in-reply-to:message-id:date:to:content-transfer-encoding :mime-version:x-gm-message-state; bh=PRQG9uKXTUyDMfldpMr+OxC5dVX9Ajw2+JqszGkl9u8=; b=d0N7ZVpg273i9BhR3ImHmtUciHe42w4R3n3HCelGnB8zNHgw828L0gOt2WdQ3IKA9F a5yCG09EYm3xKtS73atVwgpMsp3AMvGVEMF1qvIh20C5B6ZD7dCen7caCzVTgpMmw0ax ANEehtdQ1PAvCCappuUsnbVf4n7ItsBE9nw+b9tbm8UWDK9PBq4VOLL/0pOlGmkX4JRt 7yPyr0wWBeCYvJHmYfpunESiFjk6I4lAxS7AAjACLAFj6+y0GlCbRpX4grdJTRby0WYf vOtxgGbg2+xMe+fzJKYATQApiwOQ3OhV50X0yCrQQuVJKMG/65zdt2NvUnCe+hKDgEUZ I3rA== X-Received: by 10.68.242.134 with SMTP id wq6mr49742530pbc.146.1357834451346; Thu, 10 Jan 2013 08:14:11 -0800 (PST) Return-Path: Received: from [192.168.1.207] (c-50-131-59-130.hsd1.ca.comcast.net. [50.131.59.130]) by mx.google.com with ESMTPS id qt3sm1032932pbb.32.2013.01.10.08.14.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jan 2013 08:14:10 -0800 (PST) Subject: Re: [AE] Script Question References: From: Phil Spitler Content-Type: multipart/alternative; boundary=Apple-Mail-C34A2871-5326-48D8-8C88-9911D983E86C X-Mailer: iPhone Mail (10A523) In-Reply-To: Message-Id: <9BE645B9-96C5-4957-9C26-CE5D891BE36A@bonfirelabs.com> Date: Thu, 10 Jan 2013 08:14:06 -0800 To: After Effects Mail List Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) X-Gm-Message-State: ALoCoQkU5zDqtTyiZXhKel/7VShjkZpPNexoCcXhrajtiSteUOU/OoEc0l/BG9e0vx6lM/1u9C3w --Apple-Mail-C34A2871-5326-48D8-8C88-9911D983E86C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Yup 2 sliders to the same layer.=20 Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394.8200= | c : 415.571.3139 | Bonfirelabs.com "Get Social" - http://www.facebook.com/bonfirelabs On Jan 9, 2013, at 11:33 PM, David Torno wrote: > Wait I just realized something, are you adding two sliders to the same lay= er? >=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 woul= d 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 and= assign the sliders first then try to get the value, AE gives me an "invalid= 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-C34A2871-5326-48D8-8C88-9911D983E86C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Yup 2 sliders to the same layer. =


Phil


<= div>
Phil Spitler |  Creative Technologist  |  = Bonfire  Labs  |  t : 415.394.8200  |  c : 415.571.= 3139  |  Bonfirelabs.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 s= ame layer?

David Torno
Visual Effects Artist & Supervisor
O: 213.739.2290
C: 818.391.6060
-------= --------------
http://aeiowey= ou.blogspot.com

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

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

I'm having a fun time figuring out a scripting problem a= nd thought I would ask the advice of the script gurus on the list.

<= /div>
Basically I want to add 2 sliders then get the value of those slid= ers.

var RED_Slider =3D selectedLayer.Effects.addProperty= ("Slider Control");
var red =3D RED_Slider(1).value;
=

var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slid= er Control");
var green =3D GREEN_Slider(1).value;

If I run the code above, it works great however if I c= hange the order and assign the sliders first then try to get the value, AE g= ives me an "invalid object" error.

So the code belo= w will not work.

var RED_Slider =3D selectedLayer.Eff= ects.addProperty("Slider Control");
var GREEN_Slider =3D selecte= dLayer.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 Slider.

Any ideas?

Cheers.

P= hil




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

Website | Facebook | LinkedIn

=







= --Apple-Mail-C34A2871-5326-48D8-8C88-9911D983E86C--