Scene scroll trigger

Hi James!

Hype Demo project: scrolling menu_JHSv1.hype.zip (25.0 KB)


• The function “untitledFunction” has been renamed to “animateMenu”.

• In this script the local var “upORdown” is now a global var.

• The symbol “Menu Bar” has been given an ID of “menuBar”.

• The symbol “Menu Bar” has been eliminated from “scene 1”. (Do we need it?)

• There is a new function “sceneTwotoOne” that is called by the “On Scene Unload” handler for “scene 2”.


function "sceneTwotoOne"

var whatScene = hypeDocument.currentSceneName();
		
if(upORdown === 1 && whatScene == "scene 2") {
var menu = hypeDocument.getSymbolInstanceById('menuBar');
menu.continueTimelineNamed('men_anim', hypeDocument.kDirectionReverse);
}
6 Likes