Controlling Lectora Elements from Adobe Edge

Any Lectora/Adobe Edge specialist out there? I am trying to show a Lectora "next" button when the user clicks a "complete" button in an Adobe Edge project that is embedded in Lectora using Insert Web Object. The Edge file plays fine, but the button is not communicating with Lectora and showing the next button.


The "next" button HTML object name in Lectora is:

button 178


I've tried both of the following approaches in Edge, to no avail:

parent.button178.actionShow();

sym.getParentSymbol().$("button178Img").actionShow();


Any ideas? Thanks.

Discussion (6)

Thanks, it worked fine. I am using Adobe Edge Animate CC. The problem was that I was testing locally on my PC using Chrome. When I uploaded the project to the web, the Edge button controlled the Lectora button fine. So for those new to this, the following worked:


The NEXT button HTML object name in Lectora is:

button 178


On Lectora page show I initialized the button as hidden.


In Edge project, I have click action with:

parent.button178.actionShow();


This shows the Lectora NEXT button

1. Create a custom variable called MyVariable.


2. Add the following conditional action to the Next button: on click > go to next page IF MyVariable equals "done" ELSE display message "Please complete the activity".


3. Now you have to set the custom variable from within Edge Animate. Instead of "parent.button148.actionShow()" use this code - "parent.varMyVariable.set('done')"


Voila.

I have another question regarding what I think would be a more elegant solution. Rather than hide the NEXT button, I would now like to do the following:


1) NEXT Button is always showing


IF user has not completed Edge CC activity on page, NEXT button issues alert "Please complete activity"


ELSE IF user has completed Edge CC activity, NEXT button allows them to proceed


2) Would like user completion variable to be stored between sessions. So if they return the next day, they do not have to take the activity again.


Any quick tips on the best way to approach this?

I've just tried it and it worked okay for me. Here's a sample: http://193.238.223.91/edge/ (click on the gray square to make the button disappear).


The sample setup:

1. Lectora title with a single button and a Web Window that includes Adobe Edge Animate published project.

2. Edge Animate project with a single symbol (gray square) with a single action on it (click -> execute code "parent.button49.actionHide()")


So I don't see why it wouldn't work for you, unless you are previewing it locally. Then it won't work due to cross-origin settings of the iframe.


Also, it's "Adobe Edge Animate CC" or just "Edge Animate". Saying just "Adobe Edge" is confusing because "Adobe Edge" is a whole family of products.


If you publish your sample that doesn't work, I'll try to take a deeper look.

Thanks again for the tip. I knew it was pretty straightforward. But I wasn't sure if I had the syntax correct.


Cheers....

The hide/show button works fine. But when I attempt to set the variable to a new value it simply does not get passed to Edge.


I've attached my Edge files. I can't imagine what I am doing wrong. Perhaps it is where I'm setting the variable?

I'm doing it on Page Show...


Target: varMyVariable

Equal to: notdone


Seems pretty simple, but still not working. Any ideas? Thanks.

Discussions have been disabled for this post