RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
How do I make the avi player work?

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 82
Men are born, then they're formed.
I'm really new to rgss, so can someone please explain this to me? Sorry if this is stupid.

« Last Edit: March 11, 2010, 06:32:17 AM by Wicked Eden »

**
Rep: +0/-0Level 86
Zelda
Step 1. make a folder called "Movies" in your project folder
Step 2. put there your avi movie
Step 3. go to script editor
step 4. right mouse click on the list of script classes
step 5. insert a script
step 6. call it "Scene_Movie"
step 7.
copy paste this in that empty script page:

 
Spoiler for:
###########################################################
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("INTRO") )
#  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+".avi"
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


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


step 8. make a new event(somewhere in the map)
step 9. insert a new event command
step 10. go to the script command(last event command of the event command list)
step 11. copy paste:
$scene = Scene_Movie.new("INTRO")
step 12. change "INTRO" in the name of the movie in your Movies folder
step 13. have fun!




this is at least what I thought but it isn't working for me(only the sound is what I hear, I can't view the video).... weird
can some super scripter help me on this, what did I do wrong?



« Last Edit: March 18, 2010, 07:02:22 AM by guldurkhand »