Parsing a URL in Storyline, Rise

I've had a request from a client to build a module in Rise. At the end of the module the user is to visit a website, do something and copy the URL generated by the website as a result. 

They're to input that URL into the module. If the first part of the address matches a certain URL, they get one message, if not they get another. 

As far as I see it can't be done directly in Rise, which can't parse a string.  I couldn't see how to do it directly in Storyline either but I have managed to get it working in Storyline with an Execute Javascript

var player =GetPlayer();

var a = player.GetVar("TextEntry1");

var a = a.slice(0,24)


So 'newsub' becomes the first 24 characters of the URL and I can display a message depending on the value of 'newsub'. This also lets me test for things like http and https or the URL with or without 'www.'

But I'm new to 360 and don't know whether I can build the module in Rise then jump to a Storyline module to do this bit, or if I'd need to do the whole thing in Storyline.  I don't think the client will want that.

Any suggestions?



Be the first to reply