Snap sprites after mouseUp
hello:
i have strip of 20 images width between 70 pixels, dragging strip vertically, need when mouseup strip image snap nearest position of list positions:
the strip images has 2043 height , 100 width.
i have code cannot it, can me please?
is there better way it?
many thanks.
on mouseup me
mylist=[-1326,-1256,-1186, -1116,-1046,-976, -906,-836,-766,-696, -626,-556,-486,-416, -346,-276,-206,-136,-66,4]
sortedlist = mylist.duplicate()
sortedlist.sort()
pos=sprite(10).locv
vindex = sortedlist.findposnear(pos)
sprite(10).locv=sortedlist[vindex]
end
More discussions in Director Lingo
adobe
Comments
Post a Comment