Jump to content

Loading Videos in PinballY


Roadblock

Recommended Posts

Posted
On 9/24/2021 at 12:40 AM, Roadblock said:

Thanks Scutters that works like a charm in Pinball X.

Now how do I make it work in Pinball Y ?

 

Sorry,  i can't help with Y

  • 6 months later...
Posted

You can do it with javascript. There is a Solution for a common loading video from Richard LIncoln.
LaunchVideo.js Run launch.mp4 on game launches..
Maybe there will follow a solution for Table-Loading-Videos..

https://github.com/RichardL64/Visual-Pinball/tree/main/PinballY

T
his Version should hide wheel and loading.. Text:
Source: Pinball Y Group on Facebook. Thanks to Richard - he is a nice guy..

//

// LaunchVideo

// https://github.com/RichardL64

//

// Play video during game launch

// Plays ../PinballY/Media/Videos/Launch.mp4

//

// R.Lincoln April 2022

//

// On game launch

//

function myOverlayShow(ev) {

mainWindow.launchOverlay.bg.clear(0xff000000);

let video = gameList.resolveMedia("Videos","Launch.mp4" );

mainWindow.launchOverlay.bg.loadVideo(video);

ev.preventDefault();

}

// On game startup

// Stop the video

//

function myGameStarted(ev) {

mainWindow.launchOverlay.bg.clear(0xff000000);

}

// Overlay message

// Hide the PBY display items

//

function myOverlayMessage(ev) {

ev.hideWheelImage = true;

ev.message = "";

}

// Setup the launch hook

//

mainWindow.on("launchoverlayshow", myOverlayShow);

mainWindow.on("gamestarted", myGameStarted);

mainWindow.on("launchoverlaymessage", myOverlayMessage);

logfile.log("[LaunchVideo] Initialised");

// End

 

  • 4 months later...
  • 3 months later...
Posted
On 8/22/2022 at 12:09 AM, Roadblock said:

Just got back to this and tried Richard's script. Got it working!

Thanks Retsamikit and RichardL64.

 

Hello mates.
Im using LaunchVideo.js script on my PinballY machine but something its going wrong.

I have the files into correct path: PinballY/Media/Launch Videos/nametable (manufacturer year).mp4

 

And log file show something like this: Playing White Water (Williams 1993) This video file exists, and if it doesnt, show something like this: Playing Launch, but any video appears ...

Any idea? What im doing wrong?

 

Thanks!

  • 4 weeks later...
Posted

I am having trouble understanding what to do with this script. Do I copy the updated script and paste it somewhere? If so where. Please explain how to use this script. Thank you. 

Posted

Scripts are in the script folder. You can save a script as a normal txt file and rename it to *.js
Open the Main.js in a txt editor and have a look.
The Main.js is calling the scripts you want to use with:
import "seamless-launch.js";
If you do not want to launch a script, it looks like this:
//import "LaunchFade.js";

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...