Jump to content

Scaling Preloader Sprites


scutajar
 Share

Recommended Posts

I'm trying to scale the sprite that I'm setting as a preloader sprite, and it seems to react very weirdly, as it crops the sprite instead of scaling it. The cropping that is part of the preloading still occurs, but the sprite is now cut off from below and from the size.

Any idea what's wrong?

Link to comment
Share on other sites

Preloader sprites are cropped (not scaled), so if you combine the two it's likely to go a bit strange as you're finding out. If you need something more than a crop then I would suggest just listening to the fileComplete event and updating the sprite as needed in there (rather than setting it as a preloadSprite).

Link to comment
Share on other sites

I was scaling the sprite as soon as I added it to the game, and then assumed that the crop would happen normally (which it didn't). All I wanted is a smaller version of my current sprite, I'm not looking to do any fancy effects for now. (Thanks for listing the event though!)

So am I right in assuming that I'm going to need a second version of my graphic?

Link to comment
Share on other sites

Yeah for now, it sounds like it might be a bug with cropping scaled sprites, but just in order to get your game done I would use another sprite for the meantime (and if you can narrow the issue down to a self-contained bit of code, post it to github and we'll fix it!)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...