-1

I'm basically trying to build a game board. For simplicity's sake, imagine a Jeopardy! board. I'd like to be able to click on a square (imagine it says $200) and go to the question set for that square. Then, when I return to the main board, I'd like that square that I clicked on ($200) to be blank, so I know I've already clicked it.

I want to be able to do this in a full screen presentation, without having to reload the slideshow at all.

I'm thinking, hoping, I could do a script that would just straight-up replace the image of a screen with text on it, to an image of a blank screen, but I'd also be okay with building the slide with two layers of images - one with text above one without - and deleting the top layer when it's clicked.

Click on and it becomes this:

  • Please show what you have tried and add a brief description of your search efforts as is suggested in [ask]. – Rubén Mar 31 '22 at 22:45
  • I have to apologize for my poor English skill. Unfortunately, I cannot understand `I'd like to be able to click on a square (imagine it says $200) and go to the question set for that square. Then, when I return to the main board, I'd like that square that I clicked on ($200) to be blank, so I know I've already clicked it.`. Can I ask you about the detail of it? – Tanaike Apr 01 '22 at 01:00

1 Answers1

0

Replacing the image via script can be easily done by using the following script:

function myFunction() {
  var image = SlidesApp.getActivePresentation().getSlides()[0].getImages()[0];
// Get the Drive image file with the given ID.
var driveImage = DriveApp.getFileById('File ID of the new image');
image.replace(driveImage);
}

But unfortunately, assigning an image to act as a button to run script is only available on Google Spreadsheet. And by further checking it seems somebody already submitted a Feature Request for such a feature to be implemented on Google Slides as well.

References: https://developers.google.com/apps-script/reference/slides/image#replace(BlobSource)

Century Tuna
  • 1,378
  • 1
  • 6
  • 13