I am once again stuck. In the first scene I am using ‘on drag’ to run my function to display the timeline time in the box which works fine. However, I would really like the function to run continually when the timeline starts rather than be controlled by dragging the slider (eg a simple display of the timeline time as it runs). I don’t know how to continually invoke the function other than putting loads of timeline actions in (which would be ridiculous).
In the second scene, I have pasted the animations into a symbol but it doesn’t work at all. How can I make it all work in a symbol. My eventual aim is to have the timeline time continually displayed in a persistent symbol.
If anyone can spare a few minutes to take a look and solve this, I would be hugely grateful.
You can also use Hype AnimatonFrame. Its a Hype specific wrapper for RequestAnimation frame and cleans up after itself when you switch scene etc… Further more it offers a built in FPS option. Find it on the forum in the extension section.
Another option without much code is to create an additional timeline and add a timeline-action (function call from the timeline) and put a custom behavior call on half a second and the also add a start timeline on that frame action stack.
Now the custom behavior is called every 15 frames and executes your code. You can listen to this trigger from within your scene or any symbol.
You can also use a shorter interval and start and stop this “ticker” by starting and stoping the ticker timeline. Nice benefit… Hype cleans up the interval when you change scenes etc.