How do I draw shapes in a movie?

There are two options for drawing shapes using Transform. First you can draw them using the the classes that represent lines and curves:

ArrayList shapeRecords = new ArrayList();

shapeRecords.add(new FSShapeStyle(lineStyle, fillStyle, altStyle, -width/2, -height/2));
shapeRecords.add(new FSLine(width, 0));
shapeRecords.add(new FSLine(0, height));
shapeRecords.add(new FSLine(-width, 0));
shapeRecords.add(new FSLine(0, -height));

movie.add(new FSDefineShape(identifier, bounds, fillStyles, lineStyles, new FSShape(shapeRecords)));

Alternatively you can use the FSShapeConstructor class which provided a more abstract and certainly more concise API for drawing:

FSShapeConstructor path = new FSShapeConstructor();

newPath();
selectStyle(1, 1);
move(-width/2, -height/2);
rline(width, 0);
rline(0, height);
rline(-width, 0);
rline(0, -height);
closePath();

movie.add(path.defineShape(identifier));

The FSShapeConsructor also simplifies shape drawing by managing the line and fill styles used to draw the shape and tracks the current drawing point so that the bounding box that encloses the shape is correctly sized.