Mailing List AE-List@media-motion.tv ? Message #42558
From: Dan Ebberts <debberts@comcast.net>
Subject: Re: [AE] Use condensed arrays?
Date: Fri, 16 Mar 2012 14:34:14 -0700
To: After Effects Mail List <AE-List@media-motion.tv>
Your first example is missing a quote, but after fixing that, both versions work for me.
 
Dan
 
From: Nick Guth
Sent: Friday, March 16, 2012 2:18 PM
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?
 
var temp = new Array("test,"test2");
outputString = temp[0]
ERROR
 
or using a literal array
var temp = ["test","test2"]
outputString=temp[0]
ERROR
 
Instead I had to break it out into separate arguments like this. Why does it need that?
var temp = new Array()
temp[0] = "test";
temp[1] = "test2";

outputString = test[0]
 
 
--
Nick Guth
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster