Question

I have SWF vector shape, how to get access to control points of this shape? I want to move some points of this shape with as3 code. SWF created with flash professional CS5, code in flash develop.

Other way to create some Sprites in CS5, and move them with as3, but how to tie them with shape control points?

Was it helpful?

Solution

Employ readGraphicsdata() to read the GraphicsPath of your shape, it contains commands and control/anchor points. You can then parse that vector to find out the point you want to alter, then you change it, then you feed the path back into your shape via graphics.clear(); graphics.drawPath(path);, or use drawGraphicsData() instead to draw the complete set of graphics shape.

The manual on readGraphicsData()

The manual on GraphicsPath class format

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top