Newbie question about code

Greetings everyone, new to Corona, trying to make analog clock app getting this error.

How to use anchor points and how much would need to change code?

** UPDATED ** 

  1. Welcome to the community.

  2. I misread your post.  Sorry.  Very tired right now and clearly need a break.  See posts by Rob and SGS below.

If you look in the welcome window, there should be a link to get to our sample code. In the Sample Code there is a folder called Graphics and inside that folder is a folder named AnchorPoints. This sample is basically a clock hand example that will cover what you want.

After that you look at that we can have a discussion on what anchor points are and how to use them.

Rob

By default, objects anchor at the centre.  This is known as obj.anchorX = 0.5 and obj.anchorY = 0.5.  The range is from 0 (left aligned) and 1 (right aligned) in X and 0 (top aligned) and 1 (bottom aligned) in Y.

This will explain it for you - https://docs.coronalabs.com/guide/graphics/transform-anchor.html#anchors

Thanks what I needed was x center aligned and y bottom aligned. Have another 2 questions about same app. Does corona support option to add button to set my clock app as live wallpaper and/or widget? Can slider widget be used to change background pictures?

Corona cannot be used to make live wallpaper or widget apps.

Rob

Thank you all for your answers was very helpful. Found that changing image can be done using sprite sheet and slider widget.

** UPDATED ** 

  1. Welcome to the community.

  2. I misread your post.  Sorry.  Very tired right now and clearly need a break.  See posts by Rob and SGS below.

If you look in the welcome window, there should be a link to get to our sample code. In the Sample Code there is a folder called Graphics and inside that folder is a folder named AnchorPoints. This sample is basically a clock hand example that will cover what you want.

After that you look at that we can have a discussion on what anchor points are and how to use them.

Rob

By default, objects anchor at the centre.  This is known as obj.anchorX = 0.5 and obj.anchorY = 0.5.  The range is from 0 (left aligned) and 1 (right aligned) in X and 0 (top aligned) and 1 (bottom aligned) in Y.

This will explain it for you - https://docs.coronalabs.com/guide/graphics/transform-anchor.html#anchors

Thanks what I needed was x center aligned and y bottom aligned. Have another 2 questions about same app. Does corona support option to add button to set my clock app as live wallpaper and/or widget? Can slider widget be used to change background pictures?

Corona cannot be used to make live wallpaper or widget apps.

Rob

Thank you all for your answers was very helpful. Found that changing image can be done using sprite sheet and slider widget.