
301
EXTENDING FIREWORKS
Auto Shapes
Las
t
up
d
a
ted
12/8/2009
Fireworks sends this message every time the mouse moves during a drag operation (as long as
smartshape.getsDragEvents is set to
true
). For more information, see “
SmartShape object
” on page 265.
•
"EndDragInsert"
Fireworks sends this message on a
mouseUp
event after a drag operation.
•
"BeginDragControlPoint"
Fireworks sends this message when the user clicks and holds the mouse button on a control point.
•
"DragControlPoint"
Fireworks sends this message every time the mouse moves during a drag operation (as long as
smartshape.getsDragEvents is set to
true
). For more information, see “
SmartShape object
” on page 265.
•
"EndDragControlPoint"
Fireworks sends this message when the drag operation is complete.
•
"SmartShapeEdited"
Fireworks sends this message when any change has been made to the Auto Shape (for example, when the user
deletes a node).
Message handler functions
Because Fireworks sends interaction messages as the user interacts with the Auto Shape, you can write functions to
define, edit, and delete the Auto Shape and its properties. Specifically, you write functions defining the effect of
manipulating the control points on the shape properties. You can define object properties at various stages of a drag
operation: at the beginning of the operation, during the operation, and at its end. (If you define only the properties for
the end result, Fireworks waits until the drag operation ends to show the changes to the user.) For example, to have
your Auto Shape respond to an “EndDragControlPoint” message, you would write the following function:
function EndDragControlPoint(){
cp.x = smartShape.currentMousePos;
cp.y = smartShape.currentMousePos;
}
The following table lists all the available Fireworks message handler functions you can create (although, you don’t have
to write a response to every Fireworks message, only the ones important to your Auto Shape):
Function
Description
InsertSmartShapeAt()
Draws the initial shape. This function is called when the user selects the shape from the Tools
panel and clicks on the canvas, or drags the shape from the Auto Shapes panel to the canvas.
Define all initial properties of the Auto Shape in this function.
BeginDragInsert()
Tells Fireworks what to do when the user drags an Auto Shape on the canvas. You can define
movements for control points and nodes that you defined in
InsertSmartShapeAt()
.
DragInsert()
This function is called every time the mouse moves during a drag operation (as long as
smartshape.getsDragEvents
is set to
true
). See “
SmartShape object
” on page
265.
EndDragInsert()
This function is called on a mouse-up event after a drag operation.
Содержание 65011817 - Fireworks CS4 - Mac
Страница 1: ...Extending ADOBE FIREWORKS CS4...