I want to work with coordinates (or points) like 75,58.
Why this works?
Code: Select all
set the loc of graphic "rectangle" to 100,70
Code: Select all
set item 2 of the loc of graphic "rectangle" to 70
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
set the loc of graphic "rectangle" to 100,70
Code: Select all
set item 2 of the loc of graphic "rectangle" to 70
Code: Select all
on mouseUp
put the long ID of image 1 into tObject
setLoc tObject, empty, 70 -- set either horizontal or vertical or both positions of object
wait 1 second
setVertLoc tObject, 250 -- set only vertical position of object
wait 1 second
set the loc of tObject to (item 1 of the loc of tObject),350 -- set the vertical position of object in 1 line
end mouseUp
on setLoc pObject, pHorz, pVert -- set either horizontal or vertical or both positions of object
put the loc of pObject into tLoc
if pHorz <> "" then put pHorz into item 1 of tLoc
if pVert <> "" then put pVert into item 2 of tLoc
set the loc of pObject to tLoc
end setLoc
on setVertLoc pObject, pVert -- set only vertical position of object
put the loc of pObject into tLoc
if pVert <> "" then put pVert into item 2 of tLoc
set the loc of pObject to tLoc
end setVertLoc