About the JavaScript category


#1

This category is for posting your questions about Javascript within Tumult Hype.

A great place to start is our JavaScript documentation: http://tumult.com/hype/documentation/javascript/.

To search these forums, please use the search box above. Use category:javascript to limit your search to just this category:

JavaScript opens up the possibilities of the web, and animations built with Tumult Hype, to amazing possibilities.  Many interactions and functions that seem complex and would normally require JavaScript can be built in Tumult Hype without any code at all. Please review the documentation and search the forums for your question. You’ll find that many JavaScript-related questions have been answered.

Once you’re comfortable with what Tumult Hype can do, you can extend its functions with the JavaScript API. The JavaScript API allows you to programmatically build out your Tumult Hype documents to perform actions such as: “Transition to the ‘Blue’ scene with the ‘Push’ transition, then play the ‘Robin’ timeline”. That function can be run by adding the following JavaScript as an action:

hypeDocument.showSceneNamed('Blue', kSceneTransitionPushRightToLeft);
hypeDocument.playTimelineNamed('Robin');

You can find more functions like this in the JavaScript API documentation chapter. and the [JavaScript category][1] on this forum.

We will be happy to address questions such as:

  • Browser Compatibility Issues: “Why is my Hype animation causing a JavaScript error in Browser X?”
  • Suggestions: “I have a feature suggestion for your JavaScript API”
  • Bug Reports for our API: “The Tumult Hype JavaScript API for X is not functioning as expected”

We are unable to answer questions regarding:

  • JavaScript questions outside of Tumult Hype’s API: “Please create a JavaScript function that subscribes users to a mailing list”
  • “Please help me fix this custom JavaScript so that it works on all browsers”

Of course we have a lot of users here who might have experience with your JS library of choice so please feel free to post questions here as long as they have a Hype component.

Below are a few common JavaScript snippets and resources for building powerful Tumult Hype documents:

1. [Using the Drag Api for Drag + Drop detection](http://tumult.com/hype/documentation/javascript/#dragapi) 2. [Redirect your Mobile Visitors to a Different Page or Scene](http://forums.tumult.com/t/redirecting-your-mobile-visitors-to-a-different-page-or-scene/1383) 3. [Control Audio Playback using JavaScript](http://forums.tumult.com/t/controlling-audio-advanced-techniques/953) – Please review the [Audio & Video documentation](http://tumult.com/hype/documentation/) first. 4. [Set the Browser Title from the Scene’s Name](http://forums.tumult.com/t/setting-the-browser-title-from-a-scenes-name/1365)

Below are resources for learning JavaScript:

  1. Learn JavaScript at Codecademy
  2. How to Learn JavaScript properly
  3. Stackoverflow’s JavaScript Posts

If you’re looking for someone to hire for help with a Tumult Hype project, there are a few places to post your request: