Delay Random Float Script

I have a large video on my home page. After it ends, I would like to have images of butterflies float across the page. I have found the tutorial to animate images using a random float js script. Is there a way to delay this float animation until the end of the video?

https://www.wix.com/velo-examples/animations-package/float

The VideoPlayer-Element gives you already this oppertunity…
https://www.wix.com/velo/reference/$w/videoplayer/onended
Use it!

Here some additional infos…

I looked at your code and I did the second version expanded… but got this error


I am not sure what this even means because collapse is listed in the API reference. It did collapse after running but gave this error. not even sure it matters. thank you for helping me with this… I have coded in the past but am new to js. so thanks!

@bobbiannesflowers
Please always add your CURRENT-RUNNING / NOT-RUNNING code.
I can not see which code you are using at current moment
and which changes have been done.

@russian-dima

@bobbiannesflowers
Additional info.

When showing CODE → please always do it as COPY&PASTE-Text, so it is editable.
Please do not use an IMAGE to show code, inefficient way, because your helper needs time to retype the code from image first to be able to edit it.

However, did you check if the ELEMENT-ID is right?

@russian-dima I tried to copy it and I kept getting an error that there was a hyper link in the code. Which there wasn’t. I could not get it to let me submit it any other way.

@bobbiannesflowers #Introvideo not introvideo! You miss a #

@certified-code That solved it thank you!!!:nerd_face: