Please enable JavaScript to view this site.

ESL Documentation

The xposition and yposition functions can be applied to any object. The values returned are the X and Y coordinates of the origin of the specified object, and are expressed in the coordinates of the object's parent.

 

If an object is not specified, the value returned is the X position or the Y position of the current object.

 

In the following example, the user wants to move graphical region Zoom to the left by a given amount called StepSize. Before moving, the program checks to make sure that the position is such that Zoom can be moved without going off the edge of the screen.

 

response to MoveZoomLeft

    if (xposition of Zoom > StepSize) then

        change Zoom position by (-StepSize) 0

    end if