Main Menu
  • Welcome to The RPG Maker Resource Kit.

Noob question...

Started by DangerMaggie, March 25, 2007, 02:24:34 PM

0 Members and 1 Guest are viewing this topic.

DangerMaggie

I'm a noob, so forgive me for asking this... does RMXP support movie files, such as AVI, or MOV?

:)

No, to play (i forget I believe AVI files) you need a certain script.
Watch out for: HaloOfTheSun

SiR_VaIlHoR

#2
U can play any movies with a script like this:

make new script called Scene_Movie


  • class Scene_Movie

    def initialize(movie,length)
    @movie_name = Dir.getwd()+"\\Movies\\"+movie+".avi"
    @counter = length
    end

    def main

    Graphics.transition
    @wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L')
    @temp = @wnd.call(0,0,nil,"LE_NOM_DE_VOTRE_PROJET").to_s
    @movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')
    @movie.call("open \""+@movie_name+"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)
    @movie.call("play FILE",0,0,0)
    loop do
    Graphics.update
    sleep(1)
    Input.update
    if Input.trigger?(Input::B)
    break
    end
    @counter = @counter - 1
    if @counter == 0
    break
    end
    end
    @movie.call("close FILE",0,0,0)
    $scene = Scene_Map.new
    Graphics.freeze
    end
    end

change the line @temp = @wnd.call(0,0,nil,"LE_NOM_DE_VOTRE_PROJET").to_s
"LE_NOM_DE_VOTRE_PROJET" is the name of your project after,
make an event that call a script:
$scene = Scene_Movie.new("VIDEO",5) where VIDEO is the name of your video file (avi, divx etc...) and 5 is the number of seconds of your video.
Don't forget to make a new directory called Movies  in your project.

PS: if you put a video with rmv format (RV9 or RV40) or mkv etc... it's only cause u have the right codec but if u give your project to anyone that haven't the right codec, he'll not see the movie.
I'm the Alpha and the Omega, the First and the Last, the Beginning and the End.

http://qualquek.miniville.fr/
http://www.dailymotion.com/bookmarks/ojah/video/x27l78_jake-simpson-stevie-wonder-isnt-she_music

My padawan (Tsunokiette) and me :p
http://www.team-aaa.com/root/profile.php?enter_id=614556
http://www.esl.eu/fr/player/2609080/
I'm French so forgive my bad english!