Skip to main content
Inspiring
March 3, 2018
Answered

How to control playback from outside iFrame?

  • March 3, 2018
  • 1 reply
  • 739 views

I'm using a Swipe Cube template and on each side I've inserted an AnimateCC animation. When I swipe through the cube however all those 4 animations continue to run even when they are not in view. I've added them to the cube template through iFrames. The template has an optional function to do something when a transition has started or ended. Which would allow my to add some javascript to control playback of my iFrames. But how would I do that? I first would use a javascript line to getelmentbyid iframe. But then I would have to add something to control that iframe content. So I could use this.gotoAndPlay('start') to make the animation in that iFrame start from the beginning again. Is something like that even possible?

    This topic has been closed for replies.
    Correct answer ClayUUID

    HTMLIFrameElement.contentWindow - Web APIs | MDN

    Canvas documents declare a global variable, exportRoot, that points to the root timeline.

    And it's called an iframe, not an iFrame. Apple had nothing to do with it.

    1 reply

    ClayUUIDCorrect answer
    Legend
    March 3, 2018

    HTMLIFrameElement.contentWindow - Web APIs | MDN

    Canvas documents declare a global variable, exportRoot, that points to the root timeline.

    And it's called an iframe, not an iFrame. Apple had nothing to do with it.

    jiggy1965Author
    Inspiring
    March 3, 2018

    iThank you