Forum Discussion

  • Hi ! 

    Thank you for your answer ! 

    You talk about the frame.js, but I don't find the 'open_webobject()' you talked about. Is it the the frame.js in the "story_content" folder ? Or do you speak about the "storyline_compiled.js" in the mobile folder ? 

    And I promise, if I do I let you know ! 

  • SteveFlowers's avatar
    SteveFlowers
    Community Member

    Hi, Sebastian - 

    That's a tough one. The HTML5 method is different than the Flash method. I dug through the frame.js file this morning and there's a reference to open_webobject() but it's going to take some sorting to see how to invoke it. Will let you know how I get on. If you unravel the puzzle before I do, please let me know

  • Hi,

    and thank you for your answer!

    It works perfectly with the 'normal' HTML file, but with the HTML 5 it doesn't work at all... I think, the problem is in the 'storyline_compiled.js' file in the 'mobile' folder. But, I can't see why...

    Do you have any idea?

  • SteveFlowers's avatar
    SteveFlowers
    Community Member

    I'm not sure how this will behave but you may have some luck hijacking the same function the Storyline player uses to show a web object. Execute this within a JavaScript trigger and you should be able to control the loaded URL. Here's an example:

    OpenWebObject(1,"../../yourcontent.html",0,0,720,540,245,52);

    Here's the function from story.js. This describes the parameters:

    function OpenWebObject(strId, strUrl, nXPos, nYPos, nWidth, nHeight, nSlideXOffset, nSlideYOffset)

    The values above provide an offset for a sidebar display at the default width and height. You may need to play with these values to get it to work.

    You'll have problems with Web Objects in some browsers if your object target is cross browser. In your example above, you'd be able to employ storyline variables in your web object call something like this:

    var player=GetPlayer();

    var VariableSL1=player.GetVar("SLVariable1");

    var VariableSL2=player.GetVar("SLVariable2");

    var customURL="http://mywebobject.com/mysite.php?info1="+VariableSL1+"&info2="+VariableSL2;

    OpenWebObject(1,customURL,0,0,720,540,245,52);