Play Movie Button

I’m working on a project, and I need a button or a symbol to launch a movie.
You do not have start movie are (play movie Button) Nice to have it as a menu item.
I have 20 rollover;
I have 20 movies;
Need each rollover to start his movie.
how do I connect (rollover play MOVie) mouse in action. To Play MOVIE.
That’s the problem.
Can you help

Hi @Dr.ZigZag

This is 1 way to play a movie on “rollover”. Firstly, my apologies as I’m not exactly understanding what you need but …

For each of your “rollovers” you can run a small bit of javascript that will play the movies in your scene. Each of your movies will have an ID and also a class so we can detect them all.

ABE11263-7318-4EE7-8975-534A04F4128D

You can run this javascript “On Mouse Over” of any of your buttons/elements making sure that the element’s “innerText” is the same as the movie’s ID.

var movies = document.querySelectorAll(".movie");

// we are using "toLowerCase()" so we can get an exact match for the ID. 
for(movie of movies){
	if(movie.id === element.innerText.toLowerCase()){
		// movie.volume = 0.8;  // optional 
		movie.play();
		
	}
}

Here are 2 examples of elements you could use. Notice the different “innerText’s”
4AA3F5EC-CE49-4F68-9B39-EBBA64951E4C

if you were to rollover these elements then you would play the corresponding movie element with the same iD

Example Doc: playMovieOnHover.zip (772.8 KB)

2 Likes

thanks