Created a simple animation in Hype 3.0. Rotated a rectangle on its own timeline. Action - Mouse Click (Tap) to start this timeline. Exported as an html widget for ibooks. When I preview the book in ibooks on my iPad and on macbook, the animation does not start with the first touch (on iPad) and first click. It works fine for the second touch and second click. Can anyone help fix this problem? Thanks.
testA 2.zip (14.7 KB)
testA.zip (178.2 KB)
On first click, the Widget loads -- you're actually clicking on an image (Default.png) that is generated based on the playhead's position during export. To have your animation in Timeline 'A' play on first click, you'll need to detect that the Widget was opened, and then run this function 'On Scene Load' for your scene:
widget.didEnterWidgetMode = function() {
// When opening the widget, go play the 'A' timeline
hypeDocument.startTimelineNamed('A', hypeDocument.kDirectionForward)
};
testA 3.zip (12.1 KB)
This technique is from this guide:
2 Likes
Update:
I made an example book and widget here: http://tumult.com/support/examples/1363-iBooksWidgets/book.zip
The Main Timeline plays on click, and you can get the ‘Widget Open’ action to trigger an additional timeline if you want.