Copy link to clipboard
Copied
Hi, I'm trying to select a transparency channel through the use of an action script and I keep getting an error that says, "The object "channel "Transparency"" is not currently available." There is clearly a Transparency channel but it doesn't seem to be grabbing it.
Is there another way around this issue?
Any help would be much appreciated.
Thank you!
Copy link to clipboard
Copied
When this happens what kind of layer is the active layer and is only one layer active? And the background layer does not support transparency/
Copy link to clipboard
Copied
Hi JJMack. It's simply unable to grab a hold on the transparency channel. I've tried selecting all layers, the main group, selecting nothing and it doesn't work.
I did however find a piece of Javascript code that helped me accomplish it but I would ideally like to do this through ActionScript. Do you know how to convert Javascript to ActionScript? It's my understanding that it is possible?
If I can convert this it would be great:
// remove every but the composite channels,
if (documents.length > 0)
{
docRef = activeDocument;
for (var i:var= docRef.channels.length-1; i >=0; i--) {
if (docRef.channels.kind != ChannelType.COMPONENT) {
$.writeln(docRef.channels.kind);
docRef.channels.remove(); }
}
}
else
{
alert("There must be at least one open document to run this script!");
}
Cheers!
Copy link to clipboard
Copied
If you want an ActionScript you should ask in the following forums
Copy link to clipboard
Copied
I'm trying to select a transparency channel
What do you mean by that?
The transparency of a Layer as a Selection, a Layer Mask, …?
Copy link to clipboard
Copied
If you are recording a Photoshop ACTION (.atn), then target the layer containing transparency in your action. This step should be recorded in your action as either the targeting of an absolute layer name or a relative layer name if you wish to automate this, otherwise you can set a manual stop in the action and then replay the action once the user has manually targeted the appropriate channel.
Finally you would hold down the Command (Mac) or Control (Windows) key while clicking on the layer thumbnail in the layers palette. This step would then be recorded in the action as “set selection to transparency channel”.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now