Forum Discussion

MathNotermans-9's avatar
MathNotermans-9
Community Member
6 months ago

Forgot my own advice ! DONOT upgrade immediately.

And that is NEVER update Articulate Storyline immediately when Articulate sends an update. 
As they done it again. The latest update ( 3.86.32080.0 ) fails to work with older Javascript triggers. Downgrading to the version before it... ( 3.85 ) and all works properly again.

  • i would have expected there to be problems between version 3.83 and 3.84

    the logic of user.js* has changed - it is now loaded very early and has new undocumented functions

    * all Javascript triggers are saved here

    • MathNotermans-9's avatar
      MathNotermans-9
      Community Member

      Didnot notice any problems between those 2 versions... not sure why now... no too complicated code...but it did not work. Storyline crashing in 3.86 when opening a JS-trigger. Same Storyline in 3.85 i can edit the JS normally.

    • SamHill's avatar
      SamHill
      Super Hero

      Hi Jürgen, have you dug into any of those functions yet?

  • Hi Math,

    We haven't had any reports of issues with JavaScript triggers since Update 86 was released ~3 weeks ago.

    To confirm: are you experiencing an issue with your JavaScript triggers working in your published output, or with opening and editing them within Storyline?

     

    • MathNotermans-9's avatar
      MathNotermans-9
      Community Member

      The moment i try to edit the existing Javascript trigger Storyline crashes.

      I test it when i have time with some other files.

      PS: And maybe im mistaken in the version number...but the latest one. I got a message about updating yesterday and did it immediately. So not 3 weeks ago.

      • JesseTaber's avatar
        JesseTaber
        Staff

        Thanks for clarifying. I have a theory about what might have happened. I will email you with more details. 

  • For what it's worth, I'm on 3.86 and have not encountered any issues with JS triggers.

  • the new emphasize animations are solved with normal javascript in user,js, e.g.


    function ExecuteScript(strId) {
      switch (strId) {
      case "5iJndnVgyvU": // trigger on timeline starts
          Script1();
        break;
      case "6NRem5OttDF": // trigger emphasize animation
          Script2();
          break;
      }
    }

    window.InitExecuteScripts = function () {
      var player = GetPlayer();
      var object = player.object;
      var addToTimeline = player.addToTimeline;
      var setVar = player.SetVar;
      var getVar = player.GetVar;

      window.Script1 = function () {
        console.log("hallo world");
      };

      window.Script2 = function () {
        const target = object("60g35ET153K");
        const duration = 750;
        const easing = "ease-in-out";
      const id = "6l0E5nUIcp0";
        const growAmount = 0.2;

        player.addForTriggers(
          id,
          target.animate([{ scale: `${1 + growAmount}` }], {
            fill: "forwards",
            duration,
            easing,
          })
        );
      };
    };
    • Jürgen_Schoene_'s avatar
      Jürgen_Schoene_
      Community Member

      the consequence is

      • that if you use javascript triggers and you have a script error, the emphasize animations will not work throughout the training
      • the script error message in the browser console can now be found differently
        -> at the very beginning, not when the script is used