Return-Path: Received: from atl4mhob15.myregisteredsite.com ([209.17.115.53] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 4946596 for AE-List@media-motion.tv; Thu, 10 Jan 2013 21:11:55 +0100 Received: from mailpod.hostingplatform.com (mail.networksolutionsemail.com [205.178.146.50]) by atl4mhob15.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id r0AKGwb4002891 for ; Thu, 10 Jan 2013 15:16:58 -0500 Received: from webmail41 (localhost [127.0.0.1]) by mailpod.hostingplatform.com (8.13.7/8.13.7) with ESMTP id r0AKGw1n004951 for ; Thu, 10 Jan 2013 15:16:58 -0500 Received: from 76.169.86.67 (torno@sydefxink.com [76.169.86.67]) by webmail41 (Netsol 11.2.30) with WEBMAIL id 4936; Thu, 10 Jan 2013 20:16:58 +0000 From: "David Torno" To: "After Effects Mail List" Importance: Normal Sensitivity: Normal Message-ID: X-Mailer: Network Solutions Webmail, Build 11.2.30 X-Originating-IP: [76.169.86.67] X-Forwarded-For: [(null)] X-Authenticated-UID: torno@sydefxink.com Date: Thu, 10 Jan 2013 20:16:58 +0000 Subject: Re: [AE] Script Question MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I got this to work properly. A little different setup. First adding all s= liders at once and naming them, which I think may have been causing your = code confusion since it saw the exact same slider names. //START????????????????? var myLayer =3D app.project.item(1).layer("Black Solid 1"); var sliderNames =3D new Array("RED", "GREEN"); var sliderControls; for(var i=3D0; i<2; i++){ sliderControls =3D myLayer.Effects.addProperty("Slider Control"); sliderControls.name =3D sliderNames[i]; } var RED_Slider =3D myLayer.property("ADBE Effect Parade").property("RED")= .property("ADBE Slider Control-0001"); var GREEN_Slider =3D myLayer.property("ADBE Effect Parade").property("GRE= EN").property("ADBE Slider Control-0001"); RED_Slider.setValue([10]); GREEN_Slider.setValue([20]); var red =3D RED_Slider.value; var green =3D GREEN_Slider.value; alert(green); //END????????????????? -- David Torno Visual Effects Artist and Supervisor http://www.ghosttownmedia.com david@ghosttownmedia.com O: 213.739.2290 C: 818.391.6060 ------------------------------------------------ http://www.sydefxink.com (main portfolio) http://aeioweyou.blogspot.com (vfx tutorials and AE scripts blog) http://mactex.blogspot.com (free textures blog) -----Original Message----- From: Phil Spitler [mailto:phil@bonfirelabs.com] Sent: Thursday, January 10, 2013 08:14 AM To: 'After Effects Mail List' Subject: Re: [AE] Script Question Yup 2 sliders to the same layer. Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394.8= 200 | 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 = 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 w= ould ask the advice of the script gurus on the list. >> >> Basically I want to add 2 sliders then get the value of those sliders.= >> >> =09var RED_Slider =3D selectedLayer.Effects.addProperty("Slider Contro= l"); >> =09var red =3D RED_Slider(1).value; >> >> =09var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider Cont= rol"); >> =09var green =3D GREEN_Slider(1).value; >> >> 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 "i= nvalid object" error. >> >> So the code below will not work. >> >> =09var RED_Slider =3D selectedLayer.Effects.addProperty("Slider Contro= l"); >> =09var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider Cont= rol"); >> >> =09var red =3D RED_Slider(1).value; >> =09var 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.3= 94.8200 m : 415.571.3139 >> >> Website | Facebook | LinkedIn >> >> >> >> >> >> >> >> >> >>