I have a panorama in a HTML widget. The panorama has some javaScript that will start an autorotate. The function is: pano.autorotate();
How do I use a Hype button to send that autorotate function to the panorama sitting in the HTML widget? What does the JavaScript in the button look like?
An example would be useful. One tip is that you may be able to get away with using a Rectangle element and editing the Inner HTML instead of using an HTML Widget. HTML Widgets are iframes under-the-hood, and this can make communication to them harder.
Working from Mark’s example, I created a little sample of what I am after. The Hype project has child navigation buttons in left margin with the goal of controlling the parent html5 pano in the widget on the right. I am trying to figure out if it is possible to send javaScript command to the parent html widget?
No reason, other than an example someone shared was done similarly as parent/child (JavaScript to control the start of timeline, though different from my question.)
However, it could be useful if you were going to do a series of projects that reused layout components, I.e. Navigation buttons, etc.
I a man not tied to that design. I’d be happy putting my buttons in the same scene as the pano HTML widget if I could get it to work.
I will have a look at it further, I did get a version working but a bit different to you setup of using a widget for the pano. Although I still ran into cross domain issues when testing locally and not through a server.
I will put the Nav in a symbol. Which should allow you you to re use them in other projects by exporting the symbol.