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

javascript command from animate cc

Community Beginner ,
Feb 09, 2018 Feb 09, 2018

Hi all

I am using this code

     var box = $('#restart_loop')[0]; cp.clickHandler(box);

on an "on Enter" action for a slide in my captivate, it initiates an advanced action on a hidden button on the slide.

this works perfectly, but I want to add a .oam object that I have built in adobe animate cc with a button that can also initiate the same function

i would normally use:

     this.Reset.addEventListener("mousedown", fl_MouseClickHandler.bind(this));

     function fl_MouseClickHandler()

     {

      window.parent.cpAPIInterface

     )

to control captivate from an animate object. so I tried:

     this.Reset.addEventListener("mousedown", fl_MouseClickHandler.bind(this));

     function fl_MouseClickHandler()

     {

     var box = $('#restart_loop')[0]; cp.clickHandler(box);

     }

this did nothing so what I am wondering is how would I combine:

     var box = $('#restart_loop')[0]; cp.clickHandler(box);

with:

     this.Reset.addEventListener("mousedown", fl_MouseClickHandler.bind(this));

     function fl_MouseClickHandler()

     {

     window.parent.cpAPIInterface

      }

374
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
New Here ,
Feb 23, 2018 Feb 23, 2018
LATEST

Change

this.Reset.addEventListener("mousedown", fl_MouseClickHandler.bind(this));

     function fl_MouseClickHandler()

     {

    WINDOW.parent.cpAPIInterface

      }

to:

this.Reset.addEventListener("mousedown", fl_MouseClickHandler.bind(this));

     function fl_MouseClickHandler()

     {

    parent.window.cpAPIInterface();

      }

I hope this helps.

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
Resources
Help resources