I was playing around the the sample puzzle app:
https://github.com/jonbeebe/Puzzle-App
and in a function (createPuzzle), an image is added to the screen using:
puzzlePreview = display.newImageRect( puzzleFile, 500, 500 )
puzzlePreview.x = 300; puzzlePreview.y = 512
In another function (drawBackground) I added a rectangle using the same coordinates:
local myRectangle = display.newRect(300,512, 500, 500)
–doing it twice to be certain.
myRectangle.x=300; myRectangle.y=512
myRectangle.strokeWidth = 3
–myRectangle:setFillColor(140, 140, 140)
myRectangle:setStrokeColor(180, 180, 180)
They are both added in a function, and then inserted into the correct group. And yet, the rectangle shows up in a totally different place than the image does. Is it a reference point issue? And if so, why does one have a different reference point than the other one?
Any help is appreciated as I try to wrap my head around this stuff. Thanks! [import]uid: 19193 topic_id: 14599 reply_id: 314599[/import]