Image sprites are not position according where they are put

When I'm trying to put an image sprite in the canvas, they are not position correctly. When I test them in ai companion, they are position incorrectly. no matter how I change the canvas size or the screen size, it does not work. The screen size is responsive and not scrollable then canvas width and height are fill parent


.

Hello Glen, welcome to the forum!

Your screenshots do not tell us anything..... however:

  1. If you fill the Screen with the Canvas, it will be a different shape and size on different devices, so bear that in mind.
  2. No matter the image shape, all Sprites are rectangles and their datum origin is their top left corner.
  3. A Ball Sprite can optionally have a datum origin at it's center.

Simple example:
SpritePosition.aia (5.2 KB)

set imagesprite's x or y with blocks, not in designer.
And you need a timer to wait about 100ms then set its x/y, since the canvas need time to be initialized.

Some more ways to go wrong ...

  • There is a setting in Screen1 that controls the number of pixels on the screen. (I forget the name, sorry.)
  • Unlike in math class, Y is measured upside down , compared to X which is measured left to right.

Try this:
CanvasAnyDevice.aia (118.3 KB)

blocks

In the Screen Properties Palette, Sizing set to fixed.