Highlighted

I have two iframes with html generated with Animate cc. How can I make them communicate?

Explorer ,
Nov 14, 2018

Copy link to clipboard

Copied

The problem is this. If you have a html genereted with Animate CC and that html is the source of an iframe in a container page and you want to communicate with that container page. Calling a function from the iframe to the container is not a problem. If you have a function called communication() you can easely adress it from the Animate CC generated file (I will call that ACCfile) with the statement: parent.communication() . But if I want it the other way around that's my problem.

I tried this. The id of the iframe is myFrame1, the function in the ACCflile, the scr of that iframe is listen(). So I have this:

document.getElementById('myFrame1').contentWindow.listen();

That does not work. I know why it doesn't work, becaus the function is in a sepparate jsfile. If I open the HTML of the ACCfile and write the function in that HTML file and save it, then that function is activated by the function call.

How can I acces that function whitch is in the external javascript generated with Animate CC?

Views

460

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

I have two iframes with html generated with Animate cc. How can I make them communicate?

Explorer ,
Nov 14, 2018

Copy link to clipboard

Copied

The problem is this. If you have a html genereted with Animate CC and that html is the source of an iframe in a container page and you want to communicate with that container page. Calling a function from the iframe to the container is not a problem. If you have a function called communication() you can easely adress it from the Animate CC generated file (I will call that ACCfile) with the statement: parent.communication() . But if I want it the other way around that's my problem.

I tried this. The id of the iframe is myFrame1, the function in the ACCflile, the scr of that iframe is listen(). So I have this:

document.getElementById('myFrame1').contentWindow.listen();

That does not work. I know why it doesn't work, becaus the function is in a sepparate jsfile. If I open the HTML of the ACCfile and write the function in that HTML file and save it, then that function is activated by the function call.

How can I acces that function whitch is in the external javascript generated with Animate CC?

Views

461

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 14, 2018 0
Adobe Community Professional ,
Nov 14, 2018

Copy link to clipboard

Copied

try document.

getElementById('myFrame1').contentDocument.listen();

and be sure that this function in within flash is well set on the appropriate scope, so if the script is base on the root layer frame, declare the called function as

document.listen = function(){}

if that doesn't answer your question, please, use the sample on line Document sans nom  and let me know which animation must talk to who ?... one have Canvas 1, Canvas 2 and Host. That will help me to clarify...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 14, 2018 2
Adobe Community Professional ,
Nov 14, 2018

Copy link to clipboard

Copied

I'm sorry I have to go out of the office and will only come back late tonight (here in France, currently it's noon)... so before leaving... is that okay, do you need the source files?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 14, 2018 2
Explorer ,
Nov 14, 2018

Copy link to clipboard

Copied

Ok, I'm at the office here and there is never a dull moment. That's why I don't always react as quickly as I want to. People come and go and there is allways something that has to be done that interupts me from what I was doeing. Just like this morning. Sorry!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 14, 2018 0
Explorer ,
Nov 14, 2018

Copy link to clipboard

Copied

It would be very nice if I can get the source files. I tried what you said, but probably I do something wrong.

No hurry. I'm busy doing something else.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 14, 2018 0
Adobe Community Professional ,
Nov 14, 2018

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 14, 2018 3
Explorer ,
Nov 15, 2018

Copy link to clipboard

Copied

I will have a look at it, I hope this weekend. Thank you very much.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2018 0
Adobe Community Professional ,
Nov 15, 2018

Copy link to clipboard

Copied

cool...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2018 0
Explorer ,
Dec 04, 2018

Copy link to clipboard

Copied

Sorry for my late response. Many things happened the last few weeks. I cann't  give it the time it needs. Hopefully 2019 will be long enough to do further experiments. Thank you very much for your help.

I think I wll need to learn more about the basics before I dive into this.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2018 0
Adobe Community Professional ,
Dec 04, 2018

Copy link to clipboard

Copied

does the zipped files can help you ? do you need further information ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2018 0