|
| Syntax question |
 |
Sat, 24 Nov 2007 22:21:39 -080 |
Hi all.
I've got a syntax question.. I have an Effect Slider on my layer named Group. I
also have a null named NULL_Group1, NULL_Group2, etc.
How can I target those nulls in combination with using the SliderEffect 'Group'
I'm going to be having a hundred or so layers, and they will be clustered into
different 'Groups'
I'm looking for something like this:
GROUPNUM = effect("Group")("Slider");
|
| Post Reply
|
| Re: Syntax question |
 |
Sun, 25 Nov 2007 01:32:46 -080 |
GROUPNUM = effect("Group")("Slider").value;
thisComp.layer("NULL_Group " + GROUPNUM).transform.position;
You don't need to use "Position =" on the last line....unless you were
trying to just take the X value from the null, in which case you could do
something like this:
GROUPNUM = effect("Group")("Slider").value;
theXpos = thisComp.layer("NULL_Group " +
GROUPNUM).transform.position[0];
|
| Post Reply
|
| Re: Syntax question |
 |
Sun, 25 Nov 2007 05:53:46 -080 |
Thanks Paul, especially for the quick response! Gonna save this in my email
bag-o-tricks.
Am I correct that I could do something like:
"NULL_" + GROUPNUM + "_Group").transform.pos....?
|
| Post Reply
|
| Re: Syntax question |
 |
Sun, 25 Nov 2007 06:24:08 -080 |
Yes, you can sandwich it between two strings.
Sometimes you may need to force the value to become a string ( i.e. the number 1
becomes the character "1") with:
GROUPNUM = effect("Group")("Slider").value.toString();
|
| Post Reply
|
| Re: Syntax question |
 |
Sun, 25 Nov 2007 12:32:33 -080 |
Hmm.. Can't get it working yet..
MasterComp = comp("NHK_Snow_Master");
Group = effect("Group")("Slider").value.toString();
//This is what i had before that worked
//GroupScale =
MasterComp.layer("NULL_Group1").effect("P1_Scale")("Sli
der");
//this doesn't work
GroupScale = MasterComp.layer("NULL_Group1").effect("P" +
Group + "_Scale")("Slider");
|
| Post Reply
|
|
|
|
|
|
|
|
|
|