Assistance in rotation

Hey, so I was wondering, I was following a tutorial and wanted to make my image rotate as a steady speed but I seem to be getting an error.

sw9t.png

My code is as follows:

local sq = display.newImage( "maze.png" ) sq.x = display.stageWidth/2 sq.y = display.stageWidth/2 local function animate( event ) sq.rotation = square.rotation + 1 end Runtime:addEventListener( "enterFrame", animate );

What seems to be causing it? :open_mouth:

Does maze.png exist in the same folder with  your main.lua?

Also in line 8, you probably sq.rotation = sq.rotation + 1

I failed a little too hard, (facepalm) I forgot to move the images from the original folder to this new project one, Thanks.

Also, is there a simple way to center the image?

display.contentCenterX
display.contentCenterY

Are your friends :slight_smile:

Ah, thanks.

I’m excited by how fast and helpful the response are on this forums.

Does maze.png exist in the same folder with  your main.lua?

Also in line 8, you probably sq.rotation = sq.rotation + 1

I failed a little too hard, (facepalm) I forgot to move the images from the original folder to this new project one, Thanks.

Also, is there a simple way to center the image?

display.contentCenterX
display.contentCenterY

Are your friends :slight_smile:

Ah, thanks.

I’m excited by how fast and helpful the response are on this forums.