HI. [JSFL] I want to get the start and end coordinates of the brush.

Enthusiast ,
Apr 04, 2021 Apr 04, 2021

Copy link to clipboard

Copied

444.JPG

 

 

I need to get, the beginning and end of the brush.

I don't know how to get the exact point.

 

 

 

 

Views

51

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
community guidelines
Enthusiast ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

I can find every point

But

How do I find the start and end points?

 

var selPoints = new Object();
var allBezierPoints = fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].vertices

for ( i in allBezierPoints ) {
selPoints[i] = { x:allBezierPoints[i].x, y:allBezierPoints[i].y }
}
fl.getDocumentDOM().moveSelectedBezierPointsBy({x:1, y:0});
allBezierPoints = fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].vertices


for ( i in allBezierPoints ) {
if ( allBezierPoints[i].x == selPoints[i].x ) delete selPoints[i];
}

 

fl.getDocumentDOM().moveSelectedBezierPointsBy({x:0, y:0});

for ( i in selPoints) {
fl.trace ( "Point " + i + " X: "+selPoints[i].x +", Y: "+ selPoints[i].y)
}

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
community guidelines
Enthusiast ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

LATEST

hi.

I just want to get the same auto-off line feature as any other animation tool.

 

Hope to help me

 

封闭.gif

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
community guidelines