The following table lists all of 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
InsertSmartShapeAt()
BeginDragInsert()
DragInsert()
EndDragInsert()
BeginDragControlPoint()
DragControlPoint()
EndDragControlPoint()
SmartShapeEdited()
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
"SmartShape object" on page 60
This function is called on a mouse-up event after a drag operation.
Tells Fireworks what to do when the user clicks and holds the mouse
button on a control point. Fireworks can change the object as the user
moves the mouse (for example, using the RegisterMove method of the
SmartShape object, see
information about how to get the properties of a smartShape object), or
wait until after a mouse event to change the object.
The following example uses the RegisterMove method to set the
properties for the object on the mouse-down event so that the user can
preview changes during the drag operation:
function BeginDragControlPoint()
{
switch (smartShape.currentControlPointIndex) {
case 0:
var parms = smartShape.GetDefaultMoveParms();
smartShape.elem.controlPoints[0].RegisterMove(parms);
smartShape.elem.elements[0].contours[0].nodes[0].RegisterMove(pa
rms);
break;
}
}
This function is called every time the mouse moves during a drag
operation. Fireworks can change the object as the user moves the
mouse or wait until the mouse event ends to change the object.
If the
BeginDragControlPoint()
points, Fireworks will not call the
Tells Fireworks how to draw the final Auto Shape, after a drag operation
is complete. If Fireworks handled shape changes through the
BeginDragControlPoint()
that function as a starting point. In that case, the code need not reflect
every change in shape, but just the changes that aren't handled by
BeginDragControlPoint()
This function is called when any changes have been made to the Auto
Shape that might change the shape's behavior (such as removing a node
inside an Auto Shape object).
.
.
"ContourNode object" on page 29
function specifies control points or other
DragControlPoint()
function, then you can use the end result of
.
Creating an Auto Shape
is set to
). See
true
for more
function .
99
Need help?
Do you have a question about the FIREWORKS MX 2004-EXTENDING FIREWORKS and is the answer not in the manual?
Questions and answers