How to take a screenshot and save it to a file

1 favourites
  • 5 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Took a while to figure this one out because every example I could find used the browser object to execute javascript and I knew there had to be a more elegant way to do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for this, nice clean example. With later versions of C3 we can also use the new 'Wait for previous actions to complete' action and put it all in one block with a few 'Wait..' actions after the snapshot and screenshot async actions.

  • I have discovered an issue. Canvas snapshots do not include buttons for some reason. Its kind of weird, but if you have a button on screen and take a screenshot with this method then that button does not appear in the saved screenshot.

  • Note this excludes form controls like buttons and text inputs, because these are HTML elements that "float" above the main display canvas and aren't actually part of the canvas, so are excluded[...]

    I technically took that from the game recorder documentation, but the same is true for canvas snapshot.

    Depending on the browser you can use the game recorder plugin to create a video of the user screen, which includes the canvas as well as floating elements.

  • Ahh, makes sense now. Thanks.

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