Skip to main content
Participant
September 30, 2020
Answered

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

  • September 30, 2020
  • 2 replies
  • 703 views

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?
    This topic has been closed for replies.
    Correct answer Vladin M. Mitov

    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

     

     

    2 replies

    Vladin M. Mitov
    Vladin M. MitovCorrect answer
    Inspiring
    October 1, 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

     

     

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

    Thanks Vlad, very helpful.

    Participant
    September 30, 2020

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

    Participant
    September 30, 2020

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