Copy link to clipboard
Copied
Hi everyone,
I'm trying to find a way to react to events happening into Animate. My focus right now is being able, using an extension, to detecte when I enter in a symbol:
I'm using the JavaScript API. I have a minimal example script running, but I cant find anything related to Animate events listeners. Are events happening in Animate avaliable in some way to extensions developers, and is there a way to subscrive to them?
Please keep in mind that I am new to developing this kind of extension, so I might be missing something obvious.
Many thanks.
Hi.
When you enter a symbol, the current timeline changes. So you can listen for the timelineChanged event. Like this:
var myFunction = function ()
{
fl.trace("timeline changed");
}
var eventID = fl.addEventListener("timelineChanged", myFunction);
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
there are some event listeners but i'm not aware of one that would detect when you enter edit mode.
Copy link to clipboard
Copied
Hi,
Ok. I will look at the event system in further details.
Could you point me to those something linked to the event listeners, like a specific part of the documentation or a code snippet? The JSAPI doc is not really user friendly for newcomers.
Copy link to clipboard
Copied
Hi.
When you enter a symbol, the current timeline changes. So you can listen for the timelineChanged event. Like this:
var myFunction = function ()
{
fl.trace("timeline changed");
}
var eventID = fl.addEventListener("timelineChanged", myFunction);
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
Also, this documentation is older...
https://help.adobe.com/archive/pt_BR/flash/cs5/flash_cs5_extending.pdf
... but often times I find it more efficient to search for the APIs.
Copy link to clipboard
Copied
Hi JoãoCésar, this is very helpfull, I'm having a look at it. Thank you.