TypeError: Error #1034: Type Coercion failed when Layer.parent


hi,

 

in photoshop, when use layer.parent object returned hostobject.

is there anyway can check if layer's parent type layerset or document?

 

for example:

 

var l:* = layer.parent;

if (l layerset) { // something; }

if (l artlayer) { // different}

maybe question not clear.

i need know how can access layers parent (either if it's document or artlayer) cs extension builder.

 

whenever read property .parent layer hostobject in return can't cast layer (that's error #1034)

 

is there anyway can do:

 

var pl:* = mylayer.parent;

if (pl layerset) {

     // something

} else if (pl document) {

     // else

}

 

or bug?

 

thanks lot.



More discussions in Creative Suite SDK


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support