Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Is there an API to control the layer's camera

Contributor ,
Mar 05, 2023 Mar 05, 2023

2023-03-12.57.23.png

TOPICS
ActionScript , Code , Exchange extensions , Timeline
1.0K
Translate
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
Contributor ,
Mar 06, 2023 Mar 06, 2023

Yes, you can get acquainted with the Camera object at the link:

https://github.com/AdobeDocs/developers-animatesdk-docs/blob/master/index.md#camera-object

Translate
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
Contributor ,
Mar 06, 2023 Mar 06, 2023

Did not find a function that can control layer camera closing and displaying

Translate
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 Expert ,
Mar 06, 2023 Mar 06, 2023

Hi.

 

Do you mean this?

fl.getDocumentDOM().getTimeline().camera.cameraEnabled = true; // or false


https://community.adobe.com/t5/animate-discussions/camera-cannot-be-turned-off-in-symbol/m-p/1360876...

Translate
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
Contributor ,
Mar 06, 2023 Mar 06, 2023

Only control the camera display state of the layer001.gif

Translate
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 Expert ,
Mar 07, 2023 Mar 07, 2023

there are several camera methods and properties.  did you check the camera api?

 

https://github.com/AdobeDocs/developers-animatesdk-docs/blob/master/index.md#camera-object

Translate
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
Contributor ,
Mar 07, 2023 Mar 07, 2023

通过历史记录获取此代码,不起作用 @JoãoCésar 

an.getDocumentDOM().getTimeline().setLayerProperty('attachedToCamera', true, 'all');

Translate
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 Expert ,
Mar 07, 2023 Mar 07, 2023
LATEST

I get this code in the History panel:

 

an.getDocumentDOM().getTimeline().setLayerProperty('attachedToCamera', true);

 

 

But it also doesn't work. I'm not sure why. This camera API is recent and perhaps it isn't fully implemented in Animate yet.

 

Maybe @Vladin M. Mitov knows or you can contact the Animate team here: https://www.adobe.com/products/wishform.html.

 

In the meantime I'll try to think on something else.

 

Regards,

JC

Translate
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