Forum Discussion

MikeImage's avatar
MikeImage
Community Member
4 months ago

Scene Progress bars using javascript

Hello, I am using this JavaScript to control a progress bar "5xxf4t4A2ET" (from the Chrome inspect elements) below. I am trying to add  another progress bar using another element name "6PhUXotDWKQ"....
  • Nathan_Hilliard's avatar
    Nathan_Hilliard
    4 months ago

    Oops, you need to modify one additional line to make it work as intended.

    const progress = "Topic1_Progress"; // PROGRESS VARIABLE (Case Sensitive).

    For each version of the script (for each bar), assign a new variable name, if you want the bars to show different progress levels. Topic1..., Topic2..., etc.

    I mocked up a quick demo slide with 3 bars. Click to ovals to move the bars.

    Demo: https://360.articulate.com/review/content/727f8af0-8928-4cd0-8ef5-c1232f613ce8/review

    I attached the .story file.

    Note, there are a number of ways to improve this code to make it more flexible, and also make it so you only need one version on the master slide to handle any number of bars. Just switch out some of the static variables with Storyline variables and set those before triggering the script.