Popper's fix of SoundSpawn's Avi player script doesnt workn in fullscreen, i've tried removing fullscreen from the game to miss out the error message that appears, but that now conflicts with a script that fixes another error I have and causes a script hang.
line 35 is simply "fullscreen"
I dont know what else goes with that.
http://i45.photobucket.com/albums/f81/xilefian/movieerror.gif[/IMG]
line 35 is simply "fullscreen"
I dont know what else goes with that.
Code:
###########################################################
class Scene_Movie
###########################################################
#Created by SoundSpawn
###########################################################
#Fixed by Popper
###########################################################
#Instruction
# 1) Movies must in in a new folder called Movies in your directory
# 2)If you call this script from and event (EG: Call Script: $scene = Scene_Movie.new("X") [Replace X with filename, don't include the extension] )
# 3) Have fun playin movies with this script!!!
###########################################################
###########################################################
###########################################################
def initialize(movie)
@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@movie_name = Dir.getwd()+"\\Movies\\"+movie+".wmv"
main
end
def main
game_name = "\0" * 256
@readini.call('Game','Title','',game_name,255,".\\Game.ini")
game_name.delete!("\0")
@wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L')
@temp = @wnd.call(0,0,nil,game_name).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)
@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')
@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')
@width = @detector.call(0)
if @width == 640
fullscreen
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
fullscreen
end
def fullscreen()
$full.call(18,0,0,0)
$full.call(13,0,0,0)
$full.call(18,0,2,0)
$full.call(13,0,2,0)
end
$full = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')
status = " " * 255
movie.call("play FILE",0,0,0)
loop do
sleep(0.1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@message.call(@temp.to_i,11,1,0)
Input.update
movie.call("status FILE mode",status,255,0)
true_status = status.unpack("aaaa")
if true_status.to_s != "play"
break
end
if Input.trigger?(Input::B)
$scene = Scene_Map.new
break
end
end
$scene = Scene_Map.new
end
end