JavaScript, Browser Object, VR with Hotspots?

Mike Bonner bonnmike at gmail.com
Mon Jan 30 23:01:19 EST 2017


Depending on what version of LC you're using,k and if you're using the
widget, or openrevbrowser
look at revBrowserAddJavascriptHandler in the dictionary.

If using the widget, use the dropdown to select the browser widget in the
dictionary and look at the javascripthandlers property.



On Mon, Jan 30, 2017 at 8:22 PM, JOHN PATTEN via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi All,
>
> I’m not sure if this is possible with Livecode, but I thought I’d ask
> anyways.
>
> I have a html5 panorama I created in a trial version of Pano2VR. I posted
> it up here: http://jpatten.on-rev.com/vrjs/index.html <
> http://jpatten.on-rev.com/vrjs/index.html>
>
> This pano has one hot spot that just throws a JavaScript alert, “Hello
> World.”  So I know I can create a Javascript inside a hotspot in the pano
> using the Pano2VR app.
>
> Here are my questions.
>
> 1. Can Livecode intercept the Javascript result in the browser object and
> act on it?  If it can, I’m guessing I could have it return text and then
> have Livecode run an action. Something like…  if varText = “picture 1”
> then, show picture one … else/switch if vartex = "picture 2" then open
> "picture 2", etc. etc. etc.
>
>
> 2. I would like to have hotspots in a panoramic image run JavaScripts that
> LiveCode intercepts, and then act on what it catches to runs scripts in the
> stack. One hot spot might open and image. Another might open a substack,
> etc. etc. all within the LiveCode project. The Browser Object is used only
> to present the panoramic image, and the pano image acts as s pseudo
> navigation object for additional content.
>
> Anybody have a simple example of what the Javascript in the pano might
> look like, as opposed to just an alert? What scripts would I use to capture
> and act on the Javascript in the browser object?
>
> Or, maybe this is not possible…?
>
> Thank you!
>
> John Patten
> SUSD
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list