Highlighted

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

New Here ,
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?

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

 

 

Views

90

Likes

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

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

New Here ,
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?

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

 

 

Views

91

Likes

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

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Sep 30, 2020 0
New Here ,
Sep 30, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Sep 30, 2020 0
Participant ,
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

Likes

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
Reply
Loading...
Oct 01, 2020 2
New Here ,
Oct 01, 2020

Copy link to clipboard

Copied

Thanks Vlad, very helpful.

Likes

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
Reply
Loading...
Oct 01, 2020 0