Controlling parent audio from iframe

Andrew, if you open the index.hype


you’ll see the logo, the audio file and the grey iframe that links to the other file(intro_maketa).
If you look onsceneload of the index.hype, you ll find a function called “homepage” which loads the intro_maketa to the grey area

I made the index.hype and intro_maketa separate files, because i wanted to lighten the project and have some common buttons between pages. (the project is much heavier from what i ve sent).
So the index.html, calls the into_maketa.html to the grey area and I need one html to call a function to another. Maybe what i’m asking isn’t possible to be done, but maybe it’s a workaround to split the project other way?
I tried not to split it, and slows down
thank you

Right, now i understand. I have this sorted, in the function called ‘playparent’ in the intro.maketa project, you need to replace what is there with this:

var audio = window.parent.document.getElementById('audio'); 
audio.play();

NOTE: This will not work while on a local machine testing it, only on a server. Here is a working example:

http://puppetonmuppets.com/test/index.html

Hope this helps :smile:

Andrew thank you very much! This is exactly what i need!
I had it working from the beginning, but didn’t knew that is not working locally!
another question, the client wants to have the whole site downloaded locally on several laptops, so his sellers can demonstate his site/services without an internet connection. Is it a way to run it without this limitation locally? on a mac i managed to start “anvil”(http://anvilformac.com) but i think it’s too complicated for them,possibly they have only windows laptops! maybe a container or something that tricks the browser, to see the document as online?

thank you again for your precious help! :smile:

I cannot see it working from a browser locally no. He would be better having a film or slide presentation showing the images of the site.

ok thank you very much for you help! :slight_smile:

Andrew,
Is it possible to use the “document.domain” (don’t know how and where) to trick the browser when the document loads locally, so the iframe corrensponds to the window.parent command?
thank you

Trying something new here:

Since it seems a solution has been found on this topic, I’ve made the first post a ‘wiki’ post, which means that anyone can edit it. Please share a brief overview of the solution (or a link to it) in the first post by clicking the pencil icon and editing it. Let me know if you have any questions!

daniel, i ve made a quick edit to my initial msg, I think this will help other guys too!
maybe i’ll just start another topic with my last question?

That would be great. If you click 'Reply as linked topic' to the right of your post it will link your new post to this one.