I'm working on a a multiple scene website that has an intro animation per scene and reverses the animation when the user clicks on a link and then go to the new scene. In Flash, before, usually, I'd declare a bunch of global variables that I pass around and then "checked" using the actions in timeline keyframes.
I uploaded a sample file here Help Passing Variables.zip (30.5 KB)
Basically I wanted to do these things:
- Declare Global Variables (fnDeclareGlobalVariables() I dont even know if you can declare global variables in hype) in the "On Load" so that persistent symbols can reference to it.
- Play the Intro animation and pause it at the end so that user interaction can happen.
- Now I have this rectangle thing that can be clicked after the animation stops. In its actions, I did 2 things: I called a function (fnSetNextScene() to go to "Scene 2" and then I reversed the animation.
- The animation reverses and the timeline marker goes to Frame 1 (i hope). With the variable passed by the rectangle ("Scene 2" in the fnSetNextScene() function). Now frame 1 has this function called fnSceneListener() that listens to changes in the varNextScene variable set cough globally cough
What I wanted to do is for this function to check which Scene the user clicked. In this case "Scene 2" after which the page then moves to Scene 2.
Can anyone help me out?
Sorry for this long post. My problem with Tumult Hype Pro is that it just like to call functions but not pass any parameters on it. I want to be able to do reusable functions that are declared globally and can be used anywhere in the site.
Please help out.
*Edit: I saw a suggestion to use classes. I'm not good in coding is there a tutorial how to do that?
*Edit: I also saw a hype extensions... how do I do this? can anyone point me to a tutorial?