This code tries to put both the red and the blue block at x=60. It doesn’t. The red block’s x is actually 100 according to blahrect.x. Meanwhile, although the blue block says x=60, it looks on screen more like 20.
Note that the default registration point of a Corona display object is its center. For example, if you create a rectangle with display.newRect( 10, 10, 300, 300), then its initial position will be x = 160, y = 160.
If you would like to position an object by its top left corner (for example), you can change its registration point like this:
For more information, see “Display Objects: Common Object Methods” in the API Reference (page 50 of the current-edition PDF). [import]uid: 3007 topic_id: 602 reply_id: 1340[/import]