Effects problem

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
nocturnal
Posts: 2
Joined: July 27th, 2005, 3:09 am

I'm trying to script a certain effect on a layer, but the debugger says that the effect doesn't exist.

I have a solid in a layer and I'm trying to change values at key frames of the Value/Offset/Random Max effect. This is accessed through Effects > Numbers > Format > Value/Offset/Random Max in the UI.

I can get everything up to the Format property using:

timeLayer("Effects").property("Numbers").property("Format")

but if I try to get the Value/Off.. property using:

timeLayer("Effects").property("Numbers").property("Format").property("Value/Offset/Random Max")

or any other property from Format, I get the following error:

timeLayer().property().property().property() is undefined

Am I doing this correctly and if not, then how do I go about altering this property.

Any help would be appreciated.

Cheers,
Steve
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

I'm not in front of AE right now, but you could try selecting the property in the AE timeline, then running something like the following (you might have to check my syntax, as this is from memory) to check the name exactly:

alert(app.project.activeItem.selectedLayers[0].selectedProperties[1].name)

Then adjust your effect path syntax if necessary...


Edit: Looking at your post again - if you can't select the property in the timeline, it may not be scriptable.
Last edited by davestewart on July 27th, 2005, 8:49 am, edited 1 time in total.
nocturnal
Posts: 2
Joined: July 27th, 2005, 3:09 am

Thanks Dave.

Someone on the Adobe user forums came up with the code below, which does exactly what I want:

var timeLayer = compItem.layer("Time");
var effectValue = timeLayer.Effects.property("ADBE Numbers2");
effectValue.property("ADBE Numbers2-0003").setValue(25);

Cheers,
Steve
Post Reply