February 14, 2023, 11:55am
@jonathan , Daniel
While working on a project that contained On Enter Viewport actions, I was trying to catch the Enter/Exit events.
But just got undefined.
Figured out a work around using Custom Behaviour trigger Names.
But not sure if this is a known issue or even just a one off for me. (Not at Mac at mo)?
Been having a lot of oddness with Ventura and Hype.
February 14, 2023, 7:26pm
On Enter Scene
Do you mean on enter viewport, or on scene load?
I'm not sure I know enough either way to say - can you send the project that exhibits the problem? (Also, please send your workaround project). Thanks!
February 14, 2023, 8:50pm
sorry, did not notice I said scene.
It is viewport.
The Project was the one in
Make sure the size timeline is inside the Symbol
Then makes sure all the symbol Start Main Timeline action for each symbol instance are removed from the Main Timeline of the Main Scene.
You can then use waypoints/On Enterview Point
Then you can do something like this example.
If using On Enter Viewpoint
I would use an element inside the symbol ( opacity 0 ) which should allow you more adjustment of where the enter point is.
@MaxZieb 's hypeDocument.getSymbolInstance extension to the…
If we add
console.log(event) to the function that's called
we get undefined.
I have put the console.log() in this one.
scroll-Symbol_MHv1 2.hype.zip (1.6 MB)
February 14, 2023, 9:50pm
Due to the nature of how viewport actions work, there's not a "real" event; in fact even calling window.event will not give a defined one.
However, in this and a lot of other contexts, we generate "faux" events that usually have some of the fields filled in to give better context.
In fact, if you use the
HYPE_eventListeners for the
I've fixed this for the next release. Thank you!
February 14, 2023, 9:53pm
That's great news.
February 14, 2023, 10:22pm
I should mention - the faux event only has a
type field (of either
HypeExitViewport). If there's anything more you need it won't be there, and you'd need to get it another way.
February 14, 2023, 10:42pm
Nope, thats all I was expecting.