Thanks, later I will try and post the results... :) Salut, Josep
El 07/05/2010, a las 15:47, dunbarx [via Runtime Revolution] escribió: > These two handlers can be put into the script of any object. It is > no big > deal; very straighforward. The commented lines refer to a small btn > called > "handle" which I originally had to indicate exactly what you don't > want to > see. The handler can certainly be modified and put in the card > script to work > on any object. I originally made this to test which messages seemed > to be > best suited for the task, like "mouseWithin", "mouseMove" and > "mouseStillDown". > This is the "mouseDown" version. > > watch line breaks... > > > on mouseDown > repeat while the mouse is down > --show btn "handle" > put the rect of me into tRect > put whichCorner(the mouseloc,tRect) into tCorner > switch > case tcorner = "TR" > set the rect of me to item 1 of tRect & "," & item 2 > of the > mouseLoc & "," & item 1 of the mouseLoc & "," & item 4 of tRect > --set the loc of btn "handle" to item 3 of the rect > of me & > "," & item 2 of the rect of me > break > case tcorner = "TL" > set the rect of me to item 1 of the mouseLoc & "," > & item > 2 of the mouseLoc & "," & item 3 of tRect & "," & item 4 of tRect > --set the loc of btn "handle" to item 1 of the rect > of me & > "," & item 2 of the rect of me > break > case tcorner = "BL" > set the rect of me to item 1 of the the mouseLoc & > "," & > item 2 of tRect & "," & item 3 of tRect & "," & item 2 of the > mouseLoc > --set the loc of btn "handle" to item 1 of the rect > of me & > "," & item 4 of the rect of me > break > case tcorner = "BR" > set the rect of me to item 1 of tRect & "," & > item 2 of > tRect & "," & item 1 of the mouseLoc & "," & item 2 of the mouseLoc > --set the loc of btn "handle" to item 3 of the rect > of me & > "," & item 4 of the rect of me > break > end Switch > end repeat > hide btn "handle" > end mouseDown > > function whichCorner mLoc,tRect > switch > case abs(item 2 of mLoc - item 2 of tRect) < 15 and abs(item > 1 of > mLoc - item 3 of tRect) < 15 > return TR > break > case abs(item 1 of mLoc - item 1 of tRect) < 15 and abs(item > 2 of > mLoc - item 2 of tRect) < 15 > return TL > break > case abs(item 1 of mLoc - item 1 of tRect) < 15 and abs(item > 2 of > mLoc - item 4 of tRect) < 15 > return BL > break > case abs(item 1 of mLoc - item 3 of tRect) < 15 and abs(item > 2 of > mLoc - item 4 of tRect) < 15 > return BR > break > end switch > end whichCorner > _______________________________________________ > use-revolution mailing list > [hidden email] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > > > View message @ > http://runtime-revolution.278305.n4.nabble.com/Selected-object-boxes-tp2133653p2134197.html > To unsubscribe from Selected object "boxes", click here. > -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Selected-object-boxes-tp2133653p2134267.html Sent from the Revolution - User mailing list archive at Nabble.com. _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
