Get layer name

General Discussion of Scripting for Flex, Flash & CS SDK

Moderators: xbytor, DavideBarranca, Paul MR


Get layer name

Postby GuyOxford » Mon Nov 05, 2012 10:06 pm

I am writing an extension for Photoshop using Flash Builder and Extension builder 2.

I would like to query the Photoshop app which layer, by name, is currently selected. Is this possible? I would also like to know what the opacity is currently set to for the same layer. I'm guessing that would be a similar query.

All help greatly appreciated.


Get layer name

Postby GuyOxford » Tue Nov 06, 2012 9:17 pm

I've found the answer to this. For anyone else trying to solve this: -

public static var app:Application =;
public static var docRef:Document = app.activeDocument;

var name:String =;
var opacity:Number = docRef.activeLayer.opacity;

Return to “Flex, Flash & CS SDK: General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests