Hide item before scene jump


(Roger Harris) #1

Hi There, I have built a hype site that mimics a scrolling website. I’ve not done this using the ‘big long timeline of content’ method outlined elsewhere because it makes it too difficult to insert extra content or move it around etc. So, I have a persistent symbol for the menu and just push scenes top to bottom or bottom to top, depending on scroll wheel movement using a javascript function similar to the one in these forums.

This is working fine except for one thing. I need to make an element (a highlighted box over the menu) disappear when a user scrolls upwards so that it isn’t visible as the transition happens or it just tracks down the screen with the rest of the page. (its not part of the symbol)

I had the idea of pausing the timeline, then just after the pause hiding the element with opacity and calling this javascript:

hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward)
hypeDocument.showPreviousScene(hypeDocument.kSceneTransitionPushTopToBottom, 1)

The problem is its not working, the transition action seems to overrule any other event. The showPrevious bit works, but not the line above it, or if it is its not playing the timeline before transitioning? What am I doing wrong?

Thanks


(Hans-Gerd Claßen) #2

you may consider posting a samplefile … the description is not right clear to me.

http://tumult.com/hype/documentation/3.0/#document
… offers a method to set an elements opacity, which may help …


(Roger Harris) #3

Hi. Thanks but the job is huge and also very non-disclosure.

I did try the javascript method but couldn’t get that working either. I’ll see if I can make up a simple version. Essentially I just need to hide an element before jumping to another scene, thats it. However the jump always seems to happen before the hide no matter how I chain my actions


(Hans-Gerd Claßen) #4

this would be the place to embed the code to hide an element …


(Roger Harris) #5

I tried that but as the element is in every scene its unique ID changes every time and I can’t seem to make it work with the normal name? Is there a way to reference an element using its name as named by me? so it can be the same across all scenes?


(Hans-Gerd Claßen) #6

you can use a class via UI …


(Roger Harris) #7

Hmmm… That’s getting a bit beyond my javascript ability (very very basic). In the end I managed to make it work by adding a pause timeline, followed by a jump to scene as a timeline action. Then all I had to do was fire the timeline from the scroll function.

Thanks anyway.