Return-Path: Received: from qmta10.emeryville.ca.mail.comcast.net ([76.96.30.17] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 4657591 for ae-list@media-motion.tv; Fri, 16 Mar 2012 22:27:00 +0100 Received: from omta16.emeryville.ca.mail.comcast.net ([76.96.30.72]) by qmta10.emeryville.ca.mail.comcast.net with comcast id mMJT1i0061ZMdJ4AAMaDzP; Fri, 16 Mar 2012 21:34:13 +0000 Received: from HPZ200 ([76.20.32.7]) by omta16.emeryville.ca.mail.comcast.net with comcast id mMaC1i00z09DSM08cMaCQb; Fri, 16 Mar 2012 21:34:13 +0000 Message-ID: From: "Dan Ebberts" To: "After Effects Mail List" References: In-Reply-To: Subject: Re: [AE] Use condensed arrays? Date: Fri, 16 Mar 2012 14:34:14 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0073_01CD0381.DC230700" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 This is a multi-part message in MIME format. ------=_NextPart_000_0073_01CD0381.DC230700 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Your first example is missing a quote, but after fixing that, both = versions work for me. Dan From: Nick Guth=20 Sent: Friday, March 16, 2012 2:18 PM To: After Effects Mail List=20 Subject: [AE] Use condensed arrays? I was trying to use a condensed array in AE (on a text layer's source = text), but it kept throwing an error. Does anyone know why this was = throwing an error?=20 var temp =3D new Array("test,"test2"); outputString =3D temp[0] ERROR or using a literal array var temp =3D ["test","test2"] outputString=3Dtemp[0] ERROR Instead I had to break it out into separate arguments like this. Why = does it need that? var temp =3D new Array() temp[0] =3D "test"; temp[1] =3D "test2"; outputString =3D test[0] --=20 Nick Guth ------=_NextPart_000_0073_01CD0381.DC230700 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Your first example is missing a quote, but after fixing that, both = versions=20 work for me.
 
Dan
 
From: Nick Guth
Sent: Friday, March 16, 2012 2:18 PM
Subject: [AE] Use condensed arrays?
 
I=20 was trying to use a condensed array in AE (on a text layer's source = text), but=20 it kept throwing an error. Does anyone know why this was throwing an = error?=20
 
var temp =3D new=20 Array("test,"test2");
outputString =3D = temp[0]
ERROR
 
or using a literal array
var temp =3D = ["test","test2"]
=
outputString=3Dtemp[0]
ERROR
 
Instead I had to break it out into separate arguments like this. = Why does=20 it need that?
var temp =3D new = Array()
temp[0] =3D = "test";
temp[1] =3D = "test2";

outputString =3D=20 test[0]
 
 
--
Nick=20 Guth
------=_NextPart_000_0073_01CD0381.DC230700--