Relative web objects?

I have been hosting my story files on Amazon so far, using absolute URLs in my web objects.  I have one main Story file, which has slides with web objects that open various tutorials, which are their own story files.  I have to separate them out this way because the file was too big for Storyline when combined.  This works fine so far.

However, my company's IT people have said that I need to use relative URLs, since there is no way to know what the root directory will be once we move the files onto our company servers and behind our company's password check.  Is there a way to do relative links in web objects?  Please?!

9 Replies
Robert Bleeker

Ok, you may have found a fix, but for people still looking, here is one way to attempt relative WebObjects.

Only quickly tested on Mac (Chrome) and WindowsXP (IE9) and iPhone5 (HTML5 , not iPad player), so try it and see.

  • create an index.html file
  • add the following code to the HTML file and adjust the relative URL pointer.

<!DOCTYPE>

<html><header></header><body>

   <script type="text/javascript">

      //change this variable to match your web-object foldername and filename

      var folderAndFilenameOfWebObject = 'yourWebObjectFolder/index.html';

      // you can leave rest as is.

      var jumpsToGetToSameFolderAsStoryLineObject = '../../../../';

      var relativeURL = jumpsToGetToSameFolderAsStoryLineObject + folderAndFilenameOfWebObject;

      document.location.replace(relativeURL);

   </script>

</body></html>

  • maybe place the index.html file inside a folder with a unique name, so you can remember what the redirect script will link to (just for your personal identification)
  • the redirect HTML page will get included inside the story_content folder with a unique folder name (i.e. not the name of the folder you had it in).
  • once Storyline navigates to the slide that has the redirect script as a web-object, the script will auto redirect to your relative web-object.

Hope it works and is helpful to others.

--Robert

Ramon Smitherman

Robert,

Maybe I am missing your point but this solution takes my problem and just inserts a new layer.  My problem still exists.

Problem with absolute webobject links:

I create 40 courses for a project.  Each has one or more webobjects.  When I redeploy the courses from development sites to production sites then then have to change the address in all 40 courses, republish, and then reupload all the courses.

Everytime I change hosting locations (new customer) I have to change all 40 courses.

When I applied your recommendation this is how it worked...

Course Link to webobject at www.xyz.com/webobject.html

Webobject.html has the redirect code you listed above and executes "MyFolder/index.html"

If I change hosting locations I still have to change my storyline file to have the webobject link to www.newsite.com/webobject.html

Did I miss something?

Ramon Smitherman

I tired this another way which is probably what you intended.

The index.html with the referring code I load as a webobject referencing it as a local file using the folder button.  So when I publish the course that file is embedded in a folder called story_content/WebObjects as a part of the course distribution. 

So If I move the course to another web site the webobject moves with the course and the referenced link addres is still relative to the course location.

Linda Tromanhauser

Hi,

Is the absolute URL requirement new for Storyline 2? I have a Storyline 1 e-learning that contained some web objects, and I've been updating it and translating it. Now the web objects don't work. I've attached a screenshot of the error we get when we try to upload to our LMS.  Can you tell if this is because of relative URLs or something else? 

I tried adding the simulations as Flash, but there doesn't seem to be a way to get a Flash file to launch automatically in a new browser window, which is how I want these to play.

Thanks,

Linda