Hello!
I have a timeline with a series of pauses to enable the continuation of timeline on each step. (See Hype file). Is it possible to make the Reverse button play the whole time line in reverse skipping over the pauses? (I know you can “Go to time in timeline” but I would like the ability to see the timeline played back in reverse all the way back to the start.
@MarkHunte
If You were a member of Hype's "Platinum Circle" then You would get the full documentation for Hype, annotated with nifty useful coding tips like the one above.
@Daniel
This information would be valuable in the non "Platinum Circle" Documentation too.
Huh, I thought it was called the "Golden Ellipse" and it was for people who did not want to follow the normal circle of fulfillment that a non cluttered documentation offers
There are reasons Hype abstracts it’s constant with names. This are the same reasons that many useful function from the runtime are not exposed to the API. In many cases a bit very restrictive, though. Hype maintains the product for beginners and also wants to keep support to a minimum. As every function you expose also binds you to sustain functionality and the function signature in the future (meaning the way you pass parameters to it).
About these long descriptive names (in this case for constants)… they are used in the Runtime all over the place but you don’t see them in the final minimized runtime as they are optimized in the minification process. Only the string literals exposed in the API keep their long form as they are defined as Object keys and they still need to be human readable.
The naming schema starting with k is an old convention also used at one point in Apple (based on the Hungarian notation) going back to XEROX Parc. It indicates a variable as k --> constant (Although the Javascript the Runtime is written in doesn’t support real constants).
To print out the constants and their mapping from the API run the following in Hype:
// loop over API
for(var found in hypeDocument) {
//check if key starts with a 'k' --> constant
if (found.charAt(0) == 'k') {
// print the key and content to the console
console.log (found+' --> '+hypeDocument[found]);
}
}
Your welcome, but the point is not only for beginners (maybe I got that wrongly explained) although human readable makes it arguably more easy for beginners. It's more about abstraction and in that sense Daniel did it wrong as the whole goal to provide the constant would be that if you use them as hypeDocument.kDirectionForward or hypeDocument.kDirectionReverse (even though it involves more typing) Tumult can eventually update/refactor the underlying numerology/mapping without breaking your code. If you reference it directly you are committing to the current state of the code mapping. Well I don't think that forward and backwards need anything more then a "boolean" but you never know. I guess that's the reasoning for Daniel too as each Hype exports includes the current runtime and this hasn't changed for quite some while we are save using direct codes in this case (but nor best practice).