![MACROMEDIA FIREWORKS 8-EXTENDING FIREWORKS Скачать руководство пользователя страница 128](http://html1.mh-extra.com/html/macromedia/fireworks-8-extending-fireworks/fireworks-8-extending-fireworks_manual_3339145128.webp)
128
Auto Shapes
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 75
.
EndDragInsert()
This function is called on a mouse-up event after a drag operation.
BeginDragControlPoint()
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; for more
information about how to get the properties of a smartShape
object, see
“ContourNode object” on page 37
), 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].RegisterMov
e(parms);
break;
}
}
DragControlPoint()
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()
function specifies control points or
other points, Fireworks will not call the
DragControlPoint()
function.
EndDragControlPoint()
Tells Fireworks how to draw the final Auto Shape, after a drag
operation is complete. If Fireworks handled shape changes
through the
BeginDragControlPoint()
function, then you can use
the end result of 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()
.
SmartShapeEdited()
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).
Function
Description
Содержание FIREWORKS 8-EXTENDING FIREWORKS
Страница 1: ...Extending Fireworks ...
Страница 4: ...4 Contents ...
Страница 358: ...358 Fireworks JavaScript API ...
Страница 372: ...372 Index ...