• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Explorer ,
Nov 14, 2018 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

893

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
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 14, 2018 Nov 14, 2018

Votes

Translate

Translate
Community Expert ,
Nov 14, 2018 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...

Votes

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
community guidelines
Community Expert ,
Nov 14, 2018 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?

Votes

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
community guidelines
Explorer ,
Nov 14, 2018 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!

Votes

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
community guidelines
Explorer ,
Nov 14, 2018 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.

Votes

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
community guidelines
Community Expert ,
Nov 14, 2018 Nov 14, 2018

Copy link to clipboard

Copied

Votes

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
community guidelines
Explorer ,
Nov 15, 2018 Nov 15, 2018

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Nov 15, 2018 Nov 15, 2018

Copy link to clipboard

Copied

cool...

Votes

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
community guidelines
Explorer ,
Dec 04, 2018 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.

Votes

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
community guidelines
Community Expert ,
Dec 04, 2018 Dec 04, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines