Screenshot takes 2 tries

Get help using Construct 2

Post » Tue Sep 27, 2016 5:40 pm

I added a "get screenshot" function to my game. When I'm previewing it in Mozilla and click the button to get the screenshot, it opens a new window that is completely black. After that when I click on the screenshot button it lets me open it in Paint. Am I missing something here? Here's my code:

On tap "Text2" System take snapshot of canvas
Function: call CanvasSnapshot()
Browser: invoke download of CanvasSnapshot with filename "Answers"
B
6
S
1
Posts: 16
Reputation: 384

Post » Tue Sep 27, 2016 6:22 pm

https://www.scirra.com/manual/126/system-expressions

CanvasSnapshot
Contains the resulting image from a Snapshot canvas action after On canvas snapshot has run. (Note this expression is not available immediately after the Snapshot canvas action - you can only use it after On canvas snapshot triggers.) The expression returns a data URI of the image file. This can be loaded in to a Sprite or Tiled Background object via Load image from URL, sent to a server or stored locally, or opened with the Browser object in a new tab to save to disk.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458


Return to How do I....?

Who is online

Users browsing this forum: Cub3D, David181, yiuyiu6666 and 17 guests