Hi forum! A HYPE newbie here! Loving HYPE 3 so far!!
I have embedded a hype animation embed code in my existing HTML file somewhere within the body tag. Is possible when you scroll in the browser, and when the HYPE portion is in view, the hype animation is triggered?
Off the top of my head I’m thinking you could use the same technique in your HTML but inside the script access your Hype document using the global command
HYPE.documents[documentName]
Then you could start a timeline when your document comes into view.
This is a simple .html page that shows how the Hype document’s “animation” timeline is started by clicking on it.
The $( document ).ready(function() is important. The function will not register the redbox div otherwise.
“waypoint” is my document name. i.e HYPE.documents['waypoint'].startTimelineNamed('bluebox');
Place a redbox div in you document body where you want the trigger to happen.
<div id="redbox"> red box </div>
Place you Hype div in you body right under the redbox div.
<!-- copy these lines to your document: -->
<div id="waypoint_hype_container" style="margin:auto;position:relative;width:600px;height:400px;overflow:hidden;" aria-live="polite">
<script type="text/javascript" charset="utf-8" src="waypoint.hyperesources/waypoint_hype_generated_script.js?71148"></script>
</div>
You do not need any of this code in your Hype project. You only need the timeline and animation.