Reacting to Animate events inside an extension

Community Beginner ,
Mar 08, 2021 Mar 08, 2021

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:

  • Using ctrl + E,
  • or by double-clicking it.

 

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.

Views

111

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Mar 09, 2021 Mar 09, 2021
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);   https://www.adobe.io/apis/creativecloud/animate/docs.html#!AdobeDocs/developers-animatesdk-docs/master/flash_object_(fl)/fl1.md   I hope this helps.   Regards, JC

Likes

translate

Translate

Translate
Adobe Community Professional ,
Mar 08, 2021 Mar 08, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 09, 2021 Mar 09, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 09, 2021 Mar 09, 2021

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);

 

https://www.adobe.io/apis/creativecloud/animate/docs.html#!AdobeDocs/developers-animatesdk-docs/mast...

 

I hope this helps.

 

Regards,

JC

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 09, 2021 Mar 09, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 09, 2021 Mar 09, 2021

Copy link to clipboard

Copied

Hi JoãoCésar, this is very helpfull, I'm having a look at it. Thank you.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines