Thanks for this, I’ve kinda got it working insomuch as that I can make it trigger my function using the following line in myCallback:
hypeDocument.functions().initVideo(hypeDocument, element, event);
However my function initVideo() no longer returns the inner elements of my symbol when I call:
hypeDocument.getElementById(‘videoContainer0’);
So now I can no longer target my class elements within using:
hypeDocument.getElementById(‘videoContainer0’).getElementsByClassName(‘video’)[0];
I am presuming that his has something to do with not knowing what scene my element is in (although there is only one), but I now can’t seem to find a way of targeting the elements correctly.
All works correctly if I load my function initVideo() on the first frame of my timeline.
after all: it’s always good practise to post a file along with the question. my answer could not fit your needs because those are unclear … give it a try