Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
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

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?

1.3K
Translate
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

People's Champ , Nov 14, 2018 Nov 14, 2018
Translate
People's Champ ,
Nov 14, 2018 Nov 14, 2018

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...

Translate
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
People's Champ ,
Nov 14, 2018 Nov 14, 2018

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?

Translate
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

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!

Translate
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

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.

Translate
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
People's Champ ,
Nov 14, 2018 Nov 14, 2018
Translate
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

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

Translate
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
People's Champ ,
Nov 15, 2018 Nov 15, 2018

cool...

Translate
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

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.

Translate
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
People's Champ ,
Dec 04, 2018 Dec 04, 2018
LATEST

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

Translate
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