Link to a specific page in a Storyline 3 course

Hello everyone,
I would need to create a project similar to the one linked below:

https://matthewbibby.com/jump/

The problem, however, is that with storyline 3 the story.html file is very different from that of storyline 2 that is used in the tutorial above.
Has anyone managed to fix the problem?
Basically it would be necessary to be able to give an ID to each slide so that you can link it when necessary, for example: www.myquiz.it/index.html?slide3

I thank you all for your help,
See you soon!

9 Replies
m m

Hi Walt, thanks for the very quick reply,
maybe I'm not very practical but according to what Phil says it would be enough to add a numeric variable called "country", then create a trigger that runs the recommended javascript and that's it ??
Possible?

Thank you so much again, every suggestion will be gold for me!

Walt Hamilton

The javascript picks up the part of the link after the ? and places it into the variable, which in your case would represent the slide you want to jump to.

 The javascript would need to run when the timeline starts, then a series of triggers that jump to the correct slide based on the content of the variable (also to run when the timeline starts).

 

m m

I have tried in every way but to no avail, perhaps the procedure is also easy
but for now I have set a variable called "slide", I have added a triger for each slide, but the result is that the course appears but the second slide stops and starts to turn the wheel;
if instead I try to insert? slide = 3 at the end of the link, the course returns to the first slide.

I am attaching a test file that I am using, who knows where I am wrong.

Thanks again everyone,
M.

Walt Hamilton

I think you probably need to get the player only once, but if it doesn't work that way, get it twice.

The real change you need to make is that the circled variables need to have the same name. The one in "" has to match the one in the project, even to case. If you change country, you will need to change the number after substring. it should be 2 more than the number of letters in the variable name  (for slide it would = 7).

You also need to change slide to be a text variable.

 

Then after you set the value of slide, you need to add a trigger like this for each slide you want to use as a jump target.

 

Then, I would slide everything on slide 1 about .5 sec to the right on the timeline, because there is a brief flash of slide 1 before it jumps.

m m

Waaaw! But you really are a HERO!
Thank you so much for the file, I share the final file (with the 5 working pages) so that other users can use it!
I also changed the on restart> NEVER RESUME option.

Thanks again so much but the problems did not end there!
On mobile devices, when you use the? Slide = 3 link, the initial PLAY appears on a gray background.
I found many guides online (like the one you find below) but none of them work.

https://community.articulate.com/discussions/articulate-storyline/remove-play-button-on-html5-opening-screen-in-storyline-360

Do you think it is possible to eliminate it somehow?
If needed, I open a new question on the forum.

Thank you again so much!

m m

I tried an improvement on the previous project but I'm not lucky at all ..
What happens if there are multiple scenes in the storyline project?
Logically I thought it was enough to add a "scene" variable and add the new variable to the triggers;
but all this doesn't work when I add ?scene=1&slide=3 to the link! I just don't understand where I'm wrong: '(

Walt Hamilton

var scene = window.location.search.substring (7);
var slide = window.location.search.substring (7);

This code starts with the "?" and counts seven spaces, then takes all the rest of what's typed in the address.  So the first line puts "1&slide=3" into the variable scene, and the second puts "1&slide=3" into the variable slide. So that's the problem you're experiencing.

There are methods to take only a limited number of characters using js, but I don't know if they are worth the trouble.

For example, for the scene, you would start after the first "=", and take one character. but what if there are more than 9 scenes? Do you write "09" and "10", and take two characters? Or do you search for the "=" and the "&" and take everything between them? The problem is that what it searches has to be predictable.

The problem now becomes how much can we trust the creator of the address? If the learner is creating it, we can't trust that they will follow the protocol closely enough for the code to dig out the correct characters. If you are creating it, either manually or programmatically, we can trust you. In that case, I would pass the slide as scene.slide (1.2, or 3.1). Then you can use  "var scene = window.location.search.substring (7); ", and pass the slide as 1.2. Then you write your SL triggers appropriately, because you know what information can be passed. For example, "Jump to slide 2.1 Untitled Slide if slide = 2.1".

To me, it is both simple, and as close to fail proof as you are likely to get.

m m

Hi Walt,
thanks for the advice, i just fixed it by replacing the javascript with this:

var player = GetPlayer();
var nScene = getParameter('scene');
var nSlide = getParameter('slide');
player.SetVar("nScene",nScene);
player.SetVar("nSlide",nSlide);
function getParameter(theParameter) {
var params = window.location.search.substr(1).split('&');
for (var i = 0; i < params.length; i++) {
var p=params[i].split('=');
if (p[0] == theParameter) {
return decodeURIComponent(p[1]);
}
} return 0; }

I then added the two numeric variables nSlide and nScene, calling them to trigger "Jump to slide"

The situation is that in this screen and .. finally .. IT WORKS!
just write for example yourlink.it/story.html?scene=1&slide=2

I attach the file in this post, I hope it will help many people!
Now I'm posting a new thread to remove the play button that you see from mobile devices, do you have any advice?