JavaScript, Browser Object, VR with Hotspots?

JOHN PATTEN johnpatten at me.com
Mon Jan 30 22:22:52 EST 2017


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








More information about the use-livecode mailing list