Page 1 of 1

(SOLVED) Looping an AVI file in Main Menu and adding imagemap buttons for it.

Posted: Sun Jun 17, 2018 5:44 am
by Fisseha
Hi! I managed to find a way to play an AVI file as my Main Menu's screen, except it's not permanent, as it reverts back to the default main menu screen. Basically, I can't loop it lol.

Also, I've made an image map, and I want to ask if it's possible to make them appear on top of the video while it's looping, if so, how do you do it?

I've included an attachment of the general idea of the menu.

And here's the script (incase you need it to fix my problem.):

screen main_menu:

tag menu

style_prefix "main_menu"

add Movie(size=(1280, 720))
on "show" action Play("movie", "menu.avi", "loop=True")
on "hide" action Stop("movie")
on "replaced" action Stop("movie")
on "start" action Stop("movie")
(I also have this in my navigation part of the script ^)

## This ensures that any other menu screen is replaced.


imagemap:

idle "idle"
hover "hover"

hotspot(124, 644, 160, 43) action Start
hotspot(296, 644, 238, 44) action ShowMenu("load")
hotspot(1034, 644, 111, 42) action Quit(confirm=False)
hotspot(776, 645, 230, 44) action ShowMenu("extras")
hotspot(562, 646, 180, 43) action ShowMenu("preferences")

Re: Looping an AVI file in Main Menu and adding imagemap buttons for it.

Posted: Sun Jun 17, 2018 5:55 am
by kivik
Try making your video a displayable first: https://www.renpy.org/doc/html/movie.ht ... ie-sprites

Then add it to the screen instead of playing it, then it'll loop automatically. Play is actually meant to be an audio action: https://www.renpy.org/doc/html/screen_actions.html#Play so it's interesting that it works for movies as well! But it seems it's not intended for repeating.

Re: Looping an AVI file in Main Menu and adding imagemap buttons for it.

Posted: Sun Jun 17, 2018 6:09 am
by Fisseha
@Kivik

Ah, That was fast! At least I learned something today.

Also, It worked like a charm! Thank you very much for your help! <3