Description
This should be declared as a child of the thing for which you want to
enable dragging. You will need to define a view (an instance of a
subclass of
basedragimage)
to define the visual look of the thing while its being dragged.
The object that you want to accept a drop action, needs to register with
LzTrack using the same group as is declared in the dragimage.
Details
Properties (9)
-
draggername
-
<attribute name="draggername" type="string" value="dragimage" />
public var draggername : String;
an instance subclass of basedragimage that defines the
visual representation of the item while it is being dragged
-
dragging
-
<attribute name="dragging" value="false" />
-
firsttime
-
<attribute name="firsttime" value="true" />
-
startx
-
<attribute name="startx" value="$once{this.x}" />
-
starty
-
<attribute name="starty" value="$once{this.y}" />
-
xdoffset
-
<attribute name="xdoffset" value="this.getMouse( 'x' )" />
-
xdrag
-
<attribute name="xdrag" value="${checkDragPos('x', this.immediateparent.getMouse( 'x' ))}" />
-
ydoffset
-
<attribute name="ydoffset" value="this.getMouse( 'y' )" />
-
ydrag
-
<attribute name="ydrag" value="${checkDragPos('y', this.immediateparent.getMouse( 'y' ))}" />
Methods (1)
-
checkDragPos()
-
<method name="checkDragPos" args="xory, mousepos" />
private function checkDragPos(xory, mousepos);
LZX Synopsis
<class name="
lz.checkdragstate" extends="
LzState
">
<attribute name="
draggername
" type="
string" value="
dragimage" />
<attribute name="
dragging
" value="
false" />
<attribute name="
firsttime
" value="
true" />
<attribute name="
startx
" value="
$once{this.x}" />
<attribute name="
starty
" value="
$once{this.y}" />
<attribute name="
xdoffset
" value="
this.getMouse( 'x' )" />
<attribute name="
xdrag
" value="
${checkDragPos('x', this.immediateparent.getMouse( 'x' ))}" />
<attribute name="
ydoffset
" value="
this.getMouse( 'y' )" />
<attribute name="
ydrag
" value="
${checkDragPos('y', this.immediateparent.getMouse( 'y' ))}" />
</class>
JavaScript Synopsis
public
lz.checkdragstate extends
LzState
{
}