type layer?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
jdietz
Posts: 5
Joined: September 28th, 2004, 1:42 pm
Location: Chicago
Contact:

How do I get the type of layer?

I see there is a "typeName" for items, but can't find anything
for layer types..
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Here's a snippet from one of my work in progress scripts that should point you in the right direction, let me know if you need any more help.

Paul T

Code: Select all

if (curLayer.matchName == "ADBE Camera Layer") { 	
	alert("it's a camera");
} else {
	if (curLayer.matchName == "ADBE Light Layer") {
		alert("it's a light");
	} else {
		if (curLayer.matchName == "ADBE AV Layer" && curLayer.threeDLayer == true) {
			alert("it's a three dee layer");
			if (curLayer.hasAudio == false) {
				alert("without audio");
			} else {
				alert("with audio");
			}
		} else {	// I guess it must be a 2D layer then.
			alert("it's a two dee layer");
			if (curLayer.hasAudio == false) {
				alert("without audio");
			} else {
				alert("with audio");
			}
		}
	}
}
Post Reply