Skip to main content
Participant
December 6, 2016
Question

Can you bring back passing variables to Adobe Animate?

  • December 6, 2016
  • 2 replies
  • 542 views

I was a faithful Flash user and eLearning developer for many years.  One of the things that I had the most fun with was using Articulate Storyline (Yes, I know it wasn't Captivate -- sue me) and Flash to create incredibly seamless and engaging courses. What made it so cool and added the "wow" factor was the ability to pass JavaScript variable to the embedded Flash content and then pass information back out from Flash to Storyline.

Game and all sorts of incredible interactions and engagement were created and really added value to the learner.  Suddenly Adobe fell for the hyped, and to my knowledge, false accusations from Apple and Google about how non-secure the Flash player was.  If you ask me, Flash had the better video codec and Apple and Google couldn't stand that, so they did everything they could to ruin Flash for everyone, but that is a different conversation for a different day.

I moved on to embrace Unity, the game engine, because it allowed my to create my simulations and publish them as I needed.  I was frustrated because Storyline, to me, while a great tool had become just another vanilla tool for creating learning.  Adobe Animate is no Flash, but it would be a bit more useful for folks like me if we could once again pass variables back and forth between an eLearning tool and the embedded content.

Is there any way to bring this kind of functionality back?  It might bring me back.

    This topic has been closed for replies.

    2 replies

    eLearning Guy
    Inspiring
    December 8, 2016

    This is easily done a number of ways.

    First, you have to remember that Captivate is event-driven. So you can always fire off a javascript call when an event happens. Events can be user clicks something, on enter/exit of a slide, etc.

    Every situation is unique so hard to give a one-size-fits-all solution, but you can:

    • Execute javascript (or even a server-side script) when any event occurs. For example, I once had a project with a custom quiz engine that needed to allow the learner to post the results of the quiz voluntarily to a database on a different server. For that, I had a "Submit Results" button with an Advanced Action to execute javascript that was, essentially, an AJAX call to post the results, parse the response, and provide a success indicator to the user.
    • Another option is to use a GET call with parameters to pass vars back and forth. For example: http://myserver.com/myAnimateProject.html?varA=valueA&varB=valueB

    Some things to keep in mind:

    You can also always modify the published index.html to include a custom .js file with all of your functions in it. Then, just call your function(s) via one of the events. That alleviates you from using the awful javascript editor in Captivate : )

    Typically when loading in an Animate CC (or any external HTML5 asset) you would use a Web Object in Captivate. You can of course make calls to/from that web object's contents as heck, this is HTML5 after all, and objects are exposed via the DOM.

    Hope this helps!

    mark
    P.S. Steve Jobs killed Flash for one reason and one reason only: Flash was the only viable runtime that could compete with native iOS apps. At the time, Unity and its plugin was barely on the radar (and relatively speaking it still is), and the Java runtime was always lacking. So Flash was the target. And if he killed Flash then guess what? To load games on iOS you would have to do it through apps, which were installed via Apple's App Store, which = 30% cut for Apple for every sale : )

    Lilybiri
    Legend
    December 6, 2016

    Are you talking about Animate CC (which is just a new name for Flash) or about Edge Animate? I'm confused because you seem to see Animate different from Flash.

    Yes you can use JS to exchange values of variables. Did you read about the common JS API for Captivate?Learn about the Common JavaScript interface for Adobe Captivate

    A while ago, Jim Leichliter had a video course about using JS in Captivate. He explained how to exchange values of variables with Edge Animate. Too bad, he is no longer active in this business.