Forums

OverviewV-Play 1 SupportParallaxScrollingBackground problem › Reply To: ParallaxScrollingBackground problem

OverviewV-Play 1 SupportParallaxScrollingBackground problem › Reply To: ParallaxScrollingBackground problem
#6905

David

Hi Nuggetslug,

you use an image for the ParallaxScrollingBackground which is not 480*320 but 570*360 including a safe area based on on the documentation. The image is set to x,y of the scene and is bigger than the scene so you need to move the ParallaxScrollingBackground to the left (360-320)/2 and the top (570-480)/2 based on the size difference of your image to the scene.

ParallaxScrollingBackground{
      sourceImage: "img/startBackground-sd.png"
      x: -(570-480)/2
      y: -(360-320)/2
      mirrorSecondImage: false
      movementVelocity: Qt.point(-75, 0)
}

We will include an alias to the image used in the ParallaxScrollingBackground in the next Daily Build so it will be easier to obtain the image size, but for the moment you can use your numbers hardcoded.

 

Cheers, David

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support