Return-Path: Received: from mail-pa0-f48.google.com ([209.85.220.48] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4946075 for AE-List@media-motion.tv; Thu, 10 Jan 2013 07:57:34 +0100 Received: by mail-pa0-f48.google.com with SMTP id fa1so189278pad.35 for ; Wed, 09 Jan 2013 23:02:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:content-type:subject:date:message-id:to :mime-version:x-mailer:x-gm-message-state; bh=/oYvCSXjEXcxG6IRgDrFRxtlyMPAm5gWeTKV7l59b+E=; b=I+0lPtQsfc5u/Ltmi2xum+MEvx0xrPzS7JzOHd1gO31MkTwo9sc0sYvGd27C7mwDu1 OyJZg3AxkYohwEd9ixhhCzAgDFhjhvSLK3eN/KHu7Ao3Uag/XggCxlDvJRAZsOGL/SHW npK/MDTaPVY+3TNM2N6NQcQ55MUGP4wgVp0S+RIF5rDTySYAESu8kJ52j6A+mHGIqTQp Kr3I9YVz5I5MwEdmm9l0bvem4gisQ1gbXY4Yp+T2CFYtQKJ32oD74XEJrXjBb9hKihcw 9XoKDxn+NwuCaVTPivzWRLuWJDkmVe4h59EiBEqHQy3j3W/9XYfkphcBe60PBer8yXg+ FVCw== X-Received: by 10.68.189.65 with SMTP id gg1mr213975779pbc.57.1357801355385; Wed, 09 Jan 2013 23:02:35 -0800 (PST) Return-Path: Received: from [192.168.1.44] (c-50-131-59-130.hsd1.ca.comcast.net. [50.131.59.130]) by mx.google.com with ESMTPS id ty4sm370070pbc.57.2013.01.09.23.02.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jan 2013 23:02:34 -0800 (PST) From: Phil Spitler Content-Type: multipart/alternative; boundary="Apple-Mail=_D3C13877-1DE8-4235-9E78-3B04DBB097EA" Subject: Script Question Date: Wed, 9 Jan 2013 23:02:33 -0800 Message-Id: <10BF9340-252E-4EFA-9959-BA5AE8B7FB00@bonfirelabs.com> To: After Effects Mail List Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) X-Gm-Message-State: ALoCoQmONE+G09EVOne395iBe1nq/vrd6Zfd/PWdoIht/dRphaYTZ4PFOLpvzwwThZ+K6kviIrCF --Apple-Mail=_D3C13877-1DE8-4235-9E78-3B04DBB097EA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. Basically I want to add 2 sliders then get the value of those sliders. var RED_Slider =3D selectedLayer.Effects.addProperty("Slider = Control"); var red =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 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. So the code below will not work. var RED_Slider =3D selectedLayer.Effects.addProperty("Slider = Control"); var GREEN_Slider =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 = Slider. Any ideas? Cheers. Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : = 415.394.8200 m : 415.571.3139 Website | Facebook | LinkedIn --Apple-Mail=_D3C13877-1DE8-4235-9E78-3B04DBB097EA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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.

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

var = RED_Slider =3D selectedLayer.Effects.addProperty("Slider = Control");
var red =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 = 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.

So the code below will not = work.

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

Any = ideas?

Cheers.

Phil





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

Website | Facebook | 







= --Apple-Mail=_D3C13877-1DE8-4235-9E78-3B04DBB097EA--