Return-Path: Received: from atl4mhob10.myregisteredsite.com ([209.17.115.48] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 4946095 for AE-List@media-motion.tv; Thu, 10 Jan 2013 08:28:45 +0100 Received: from mailpod.hostingplatform.com (mail.networksolutionsemail.com [205.178.146.50]) by atl4mhob10.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id r0A7Xlun028044 for ; Thu, 10 Jan 2013 02:33:47 -0500 Received: (qmail 8127 invoked by uid 0); 10 Jan 2013 07:33:47 -0000 Received: from unknown (HELO ?10.0.1.3?) (torno@sydefxink.com@75.51.175.213) by 0 with ESMTPA; 10 Jan 2013 07:33:47 -0000 Subject: Re: [AE] Script Question References: From: David Torno Content-Type: multipart/alternative; boundary=Apple-Mail-2787A04A-2819-455D-BD25-AFA6EDE9B797 X-Mailer: iPhone Mail (9B176) In-Reply-To: Message-Id: <431BB320-8BE3-4E15-A96A-8B58CFD7330F@sydefxink.com> Date: Wed, 9 Jan 2013 23:33:45 -0800 To: After Effects Mail List Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) --Apple-Mail-2787A04A-2819-455D-BD25-AFA6EDE9B797 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Wait I just realized something, are you adding two sliders to the same layer= ? 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 9, 2013, at 11:02 PM, Phil Spitler wrote: > I'm having a fun time figuring out a scripting problem and thought I would= 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 a= ssign the sliders first then try to get the value, AE gives me an "invalid o= bject" 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.8= 200 m : 415.571.3139 >=20 > Website | Facebook | LinkedIn >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 --Apple-Mail-2787A04A-2819-455D-BD25-AFA6EDE9B797 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Wait I just realized somet= hing, are you adding two sliders to the same layer?

David Torno
V= isual Effects 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"
-Charles Field

On Jan 9, 2013, at 11:02 PM, Phil Spitl= er <phil@bonfirelabs.com> w= rote:

I'm having a fu= n time figuring out a scripting problem and thought I would ask the advice o= f the script gurus on the list.

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

var RED_Slid= er =3D selectedLayer.Effects.addProperty("Slider Control");
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> var r= ed =3D RED_Slider(1).value;

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

If I run the co= de above, it works great however if I change the order and assign the slider= s 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 selectedLayer.Effects.addProperty("Slider Control");<= /div>
= var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider Contr= ol");

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 for= gets the Red Slider.

Any ideas?

Cheers.

Phil





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

Website | Facebook | LinkedIn

=







= --Apple-Mail-2787A04A-2819-455D-BD25-AFA6EDE9B797--