I was trying to write code for dynamic variables that would play a group of 3 timelines in order depending on which the user clicked. I started to use eval() but ran into problems with the apostrophes and the playTimeline function.
If I try to use eval() dynamically with
hypeDocument.playTimelineNamed(‘verb1’, hypeDocument.kDirectionReverse, false); where I want the timeline name to be verb1 verb2 or verb 3, I get something like:
for (var x=1; x < 3; x++) {
eval('hypeDocument.playTimelineNamed(/'verb' +x + '/', hypeDocument.kDirectionForward, false);')`
}
(From what I read using eval() is bad for a number of reasons but I didn’t understand the other options like making an array of objects or symbols)