The new Get / Set APIs should make short work of this task…
hypeDocument.setElementProperty(element, propertyName, value, optionalDuration, optionalTimingFunctionName)
The “element” is the ID of the element, or it can be a dynamic event – such as the element that was clicked.
The “propertyName” here would be “left” for “x” and “top” for “y”. “opacity” can also be used as a property.
The API Documentation has more information.