Skip to main content
Known Participant
August 5, 2021
Answered

Can a layer in one page be made visible or hidden from a button in different page for epub

  • August 5, 2021
  • 2 replies
  • 888 views

I'm creating an epub document. I want a layer in page2 be made hidden/visible by clicking a button in page1. I tried multi state objects, but using that we can control the states present in the same page as the button. Any ideas please.

This topic has been closed for replies.
Correct answer rayek.elfin

This is not possible in an epub: states cannot be saved between pages, and each page is a separate html page that has no awareness of other pages, nor can pages 'communicate' (meaning use variables and share variables) between them.

2 replies

BobLevine
Community Expert
Community Expert
August 5, 2021

What possible good would that do even if you could do it. A fixed layout epub only displays one page at a time.

Known Participant
August 5, 2021

so that when i move to next page, the layer will be visible for me. I could not accomodate all the buttons & layers in a single page. So i have to keep a page dedicatedly for button and another page to dedicated to layers.

Diane Burns
Inspiring
August 5, 2021

Can you provide a sample file so we might understand better what it is you're trying to accomplish?

hammer0909
Community Expert
Community Expert
August 5, 2021

I'll need more of an idea what you're trying to do in order to help you. Layers are document-wide so if you hide a layer, it will hide everything in the document that is on that layer.

Known Participant
August 5, 2021

In order to hide a layer using a button, either layer has to be a button or should be in multi state object. I tried both. example: I converted a layer (in page2) into a button (layerBtn) & made hidden until triggered and i made another actual button (OnBtn) in page1 that has actions when clicked it make the 'layerBtn' appear. But it does not work. it works only when both buttons are in same page. I hope I answered your question.

rayek.elfin
rayek.elfinCorrect answer
Legend
August 7, 2021

This is not possible in an epub: states cannot be saved between pages, and each page is a separate html page that has no awareness of other pages, nor can pages 'communicate' (meaning use variables and share variables) between them.