I am trying to trigger an event as image link is modified in InDesign file, using action script API in csaw lib. But it's thowing the error:
invalid value for parameter 'handler' of method 'addEventListener'. Expected File or JavaScript Function, but received nothing.
here is my code to add and handle the event:
tempLink.addEventListenerLink("afterAttributeChanged", handleLinkModified);
private function handleLinkModified(event:com.adobe.indesign.Event):void
{
trace("From link handler: LINK modified");
}
I got this idea from one of John Hawkinson Thread: http://forums.adobe.com/message/4049418
Can someone let me know what''s going wrong with my logic?
Thanks
Mac
If you are using Extension Manager, right click on the project and select Properties. Select "CS Extension Builder Libraries" on the left side. Select the Host Adapters tab and check Adobe CSHA InDesign.
You should then be able to import IDScriptingEventAdapter and then you do something like this:
IDScriptingEventAdapter.getInstance().addEventListener(eventName,handl erFunction);
Harbs
North America
Europe, Middle East and Africa
Asia Pacific