Unload Scene or Close Document with button in scene hype

Hi

I have tried closing the document (scene) with the code javascript function window.close ( and this works on file opened on the browser) but I use (insert) file in the site project wordpress not function.

In the project site wordpress everything works (animation, text, image, change scene) but I need to download/unload scene or close scene with the button because my project hype is a preload animation with the final button close preload and show home site.

Do you have any suggestions?

Is possible with javascript document/scene close or unload document?

I I have tried with timelines and unload layout but i didn't solve it

I have set the setting duration time on preload and after 10 seconds the preload closes, but if I want the button in the hype scene to close the hype file?

Thanks

I just tested…

window.close()

…in the developer console. It closed the window. So, I'm not sure what's wrong. Perhaps it's a security issue. Are you trying to close the window automatically? I'm thinking that action might be prevented by the browser.

If you do have a “Close” button, are you using an iFrame in Wordpress? That too might be an issue, as I doubt a child window can close a parent window. This is just theoretical speculation though.

You could also remove the .HYPE_document element. And delete the reference under window.HYPE.documents … Brute force

Hi Max,

How can I delete the .HYPE_document element?

how do you remove the reference window.HYPE.documents with brute force?

Hi Photics

I have already used window.close() in the function, and if I open the preview via browser it works and also when opening html files. But it doesn't work if I open the file in the iframe or div of the page on wordpress.

Thanks

do you have a link/ example of your page?

Are you using the WordPress plugin?

There's an option that doesn't require using an iFrame.

I think my first question is: why are you trying to do this? What problem are you trying to solve?

Generally the only way to fully remove a Hype animation from a page is to first use an iframe and point it at a Hype webpage/animation. Then to fully remove it, you would change that iframe's src to something else.