How to load and change a frame of a sprite...

0 favourites
  • 3 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hello,

    How to create a sprite in my game with for example 3 frames with images I want to upload.

    I would like to load images in my game that are not in my basic project.

    Change the animation of a sprite by putting its images that I just changed.

    For example:

    Load image 1, change frame #1 of my sprite with the new image

    Load image 2, change frame n°2 of my sprite with the new image

    Load image 3, change frame #3 of my sprite with the new image

    For example I would like to create a button in my game, I would like to choose

    just 3 images, one for each frame (1, 2, 3).

  • Dayvid86

    from the manual for the sprite object:

    Load image from URL

    Load an image from a given URL. The current animation frame will be replaced with the image. It is not shown until the image has finished downloading, and On image URL loaded triggers. Images loaded from different domains are subject to the same cross-domain restrictions as AJAX requests - for more information see the section on cross-domain in the AJAX object. Data URIs can also be passed as an image, e.g. from a canvas snapshot or webcam image. The Size parameter sets whether the Sprite object will be set to the image size when it loads, or whether to keep its current size and stretch the image.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you:)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)