So, in my code I uses g4p guide in order to help me create a user interface and buttons, as I am a beginner. when the button is pressed, the video should begin to play, and the buttons disappears. The video begins to play, but the image freezes, whilst the audio continues to play. I think the video only plays when the button is pressed down, but as soon as I release the button, the video stops playing. does anyone have any suggestions to fix this?
I realised that the reason it didn’t work was because the draw function was empty, but I could figure out how to change it and still get the result I want.
I also tried to do this without using the G4P guide. Instead I used a mousepressed function. however, the video plays but you cant see it. how do I solve this, and also how can I hide the button after its been clicked?
firstly you don’t need to call mousePressed, secondly, the way your code was it would advance one frame each time someone pressed the button. What I did was creating a variable if it is true it will play.