Well git is install, i have a feelling it have something to do whit my enviroment variables, but it seem like am not doing the right thing. I put it in path, i put it in it own space but nothing work xD
Il restard my computer and see if it help in any ways
If you need video playback only then just grab all files that you need and add them into your project. I did it this way.
As far as I remember you need only Movie.j3md (with shaders), TextureMovie and ImageExchanger. The code is written so well that it is easy to use it even as GUI object.
Edit : My bad, the jar do work, i think am just not using the right class.
So… what next? I saw an exemple by abies
But it don’t seem to work at all :/. I can’t creat the class media and mediaPlayer don’t want to be imported. For the texture il guess its a texture il apply the surface i want to video on?
i am also using eclipse and work whit java 1.7, but i don’t seem to be able to doawload the javaFX jar anywhere.
But i also see everywhere that javaFx need to be install on the computer. Does that mean it will need to be package whit my installer if i want people to be able to use it in game?
I’m afraid but in that classes I mentioned before, there is some code that needs Java 8. That code can be replaced, but probably you’ll need to add those files into your project instead of using precompiled jar.
JavaFX is included into JRE/JDK from 1.7.0 update 45 (or something like that). Check if you have jfxrt.jar somewhere inside your installation.
And it work! Marvellous! All is left is to make sure it take the whole screen no matter the size and then some integration, but i can do that on my own
Thanks again I’ll soon post the results and try to put every anwser at the begening of the topic if anyone was in need to do the same x).
Okay everything is working great in the testing class but as soon as i get it out of there, i get a green screen. Am applying the texture on a Label build in tonegod, and as i said it work when every part of the code are in the same area. The green screen also play the music. Il get back after a few test
Okay found it. It was actully the @Override
public void simpleUpdate(float tpf) {
super.simpleUpdate(tpf);
lab.movieMaterial.update(tpf);
}
But i kinda wonder, won,t that slow in any way my whole program having this command looping all the time? I could probably put it in a AbstractControl to avoid that? o well any way il have to test that later, il come back whit a complet class
Nan, i did not saw it, but then again I kinda prefers my solution : simply build an extends label whit an AbstractControl inside and i have full control. I can then creat multiple label and they simpl act like normal labels.
I think everything is pretty much done, i just have one question left : how can i make it loop? Is theire any method for that? Cause after searching a bit in MediaPlayer i could not find any setLooping(true) or something like that.
Media media = new Media(fpath); // javafx.scene.media.Media
_mp = new MediaPlayer(media); //javafx.scene.media.MediaPlayer
_mp.setVolume((float)Config.getInstance().getVolumeSfx() / 10f);
_tex.setFXMediaPlayer(_mp);
_mp.setOnEndOfMedia(some Runnable); // <------- HERE