Copy link to clipboard
Copied
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
}
Copy link to clipboard
Copied
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.