0 Replies Latest reply on Jan 7, 2014 10:30 AM by ladobeugm

    Issues converting JS function to Animate. Close, but not quite?

    ladobeugm Level 1

      I've been spending a good part of the last 3 days attempting to get a function from another API to work in an EdgeAnimate environment. I'm pretty close but I'm just not sure if I'm there yet and could use some validation for that.


      I'm embedding videos from Wistia, a video hosting service. They have a function from their playlist API called 'ready' which allows me to do something once the video playlist is loaded and ready to go. In this case, hide a div/symbol. That's it. Nothing more than that.


      So I've already declared a variable called wistiaPlayist in my init function. So underneath that, I tried a number of things like:



      wistiaPlaylist.ready(function() { sym.$("logo").hide(); });


      That just threw Javascript type errors in console. I finally got to the point where I tried another function and ran with this:



      function myWistia(){

          console.log("compositionReady: ready");








      That seems to work, but I'm not so sure. When I check the order in console, it seems that the ready function fires first, then the videos. Something just doesn't seem right. Plus, I'm trying to target a variable, not a symbol.


      So am I doing this right? Am I at least close?


      The example files are at: https://www.dropbox.com/s/1aj3cjpea2772h0/ready.zip