Adobe 38039927 - Fireworks CS3 - PC Extended User Manual page 283

Extending fireworks
Hide thumbs Also See for 38039927 - Fireworks CS3 - PC:
Table of Contents

Advertisement

"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
InsertSmartSha-
peAt()
BeginDragInsert()
DragInsert()
EndDragInsert()
Description
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.
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()
This function is called every time the mouse moves during a drag operation (as
long as
smartshape.getsDragEvents
Shape object" on page 241
This function is called on a mouse-up event after a drag operation.
is set to
). See
true
.
ADOBE FIREWORKS CS3
Extending Guide
"Smart-
279

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs3

Table of Contents