Hi
I'm building a palette via scriptingUI. I'm trying to create a palette that changes depending on what you have selected. Is this not possible in AE?
This is a test code just to trouble shoot:
function SelectionViewer()
{
var selectionViewer = this;
this.buildUI = function (thisObj)
{
// dockable panel or palette
var pal = (thisObj instanceof Panel) ? thisObj : new Window("palette", "selectionViewer", undefined, {resizeable:false});
var testText = pal.add("statictext", [2, 2, 201, 20], "Selected Item");
}
// Methods
selectionViewer.updateSelected = function()
{
testText.text = app.project.activeItem;
}
this.run = function (thisObj)
{
this.buildUI(thisObj);
app.addEventListener("afterSelectionChanged", selectionViewer.updateSelected);
};
}
new SelectionViewer().run(this);
It gives me this error:
"Unable to execute script at line 24. Funtion app.addEventListener is undefined"
Any help?
Thanks,
Wagner