on getPropertyDescriptionList me
p_list = [:]
p_list.addProp(#whichItem, [#format : #symbol, #comment : "Control point or object?", #default : #point, #range : [#point, #object, #background]])
return p_list
end
on editQuad me
if whichItem = #point then
sprite(spriteNum).loc = sprite(activeSprite).quad[whichPoint]
end if
end
on hidePoints me
if whichItem = #point then
sprite(spriteNum).loc = point(-1000, -1000)
end if
end
on mouseDown me
if whichItem = #point then
repeat while the stillDown
sprite(spriteNum).loc = the mouseLoc
sendSprite(activeSprite, #rescaleQuad, whichPoint, sprite(spriteNum).loc)
end repeat
end if
end
on beginSprite me
if whichItem = #point then
whichPoint = (spriteNum mod 4) + 1
sprite(spriteNum).loc = point(-1000,-1000)
else
quadList = sprite(spriteNum).quad
end if
end
on rescaleQuad me, whatHandle, whatPoint
quadList.setAt(whatHandle, whatPoint)
sprite(spriteNum).quad = quadList
updateStage
end
on mouseUp me
if whichItem = #object then
activeSprite = spriteNum
sendAllSprites(#editQuad)
else if whichItem = #background then
sendAllSprites(#hidePoints)
end if
end
on getBehaviorDescription me
return "For this behavior you will need 4 small " & quote & "handle" & quote & " sprites and at least one image, text, or shape sprite. Drop the behavior on the points, the object and on a background sprite. When you click an object the handles will jump into place and draging them will skew and scale the image. Click the background the hide the handles off screen."
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA