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

JSFL document.selection can't access more than 1 shape made with Merge Drawing mode

New Here ,
Sep 30, 2020 Sep 30, 2020

Copy link to clipboard

Copied

When I select 2 shapes created using Merge Drawing mode, and try to access in JSFL using the code:

 
an.outputPanel.clear();
var doc = an.getDocumentDOM();
an.trace("No. of selected items: " + doc.selection.length);
 
only 1 selected.
Shapes created using Object Drawing mode work fine though. Is there command in JSFL to access shapes created with Merge Drawing mode?

Views

382

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

Engaged , Oct 01, 2020 Oct 01, 2020

Hi,

Unfortunately, a raw shape is treated as one single object in terms of "selection". But, you can iterate through contours within the shape and detect separate closed areas. See this thread:
https://community.adobe.com/t5/animate/jsfl-how-to-get-separate-bounding-boxes-for-shapes-in-merge-drawing-mode/m-p/10596651?page=1#M196252

 

 

Votes

Translate

Translate
New Here ,
Sep 30, 2020 Sep 30, 2020

Copy link to clipboard

Copied

Think for a moment about what MERGE drawing mode actually does.

Votes

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
New Here ,
Sep 30, 2020 Sep 30, 2020

Copy link to clipboard

Copied

The 2 shapes created are separated from each other, I understand if they overlap.

Votes

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
Engaged ,
Oct 01, 2020 Oct 01, 2020

Copy link to clipboard

Copied

Hi,

Unfortunately, a raw shape is treated as one single object in terms of "selection". But, you can iterate through contours within the shape and detect separate closed areas. See this thread:
https://community.adobe.com/t5/animate/jsfl-how-to-get-separate-bounding-boxes-for-shapes-in-merge-d...

 

 

- Vlad: UX and graphic design, Flash user since 1998
Member of Flanimate Power Tools team - extensions for character animation

Votes

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
New Here ,
Oct 01, 2020 Oct 01, 2020

Copy link to clipboard

Copied

LATEST

Thanks Vlad, very helpful.

Votes

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