Main Menu
  • Welcome to The RPG Maker Resource Kit.

AVI Insert Script. I need help with this.

Started by Maytag, October 02, 2006, 06:30:40 AM

0 Members and 1 Guest are viewing this topic.

Maytag

I need a quick script that will allow me to insert an AVI.. if you can get SWF to work. that would be AMAZING *SWF is Shockwave File  *or Shockwave Format**

well please someone make this script.. ive seen it on Rmxp.net but its dead now :(
Currently looking for help with some HUD scripts!
Any advice is welcome!
http://rmrk.net/index.php/topic,47471.0.html

Winged




Arrow

#2
So this plays the movie, right? How can I make it so the menu can't be pulled up/make it work in fullscreen?

###########################################################
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

xxMAZxx

where abouts does the movies folder need to go - graphics or just the project folder?

:)

just drop it anywhere and make sure it is labled right, and see if it works
Watch out for: HaloOfTheSun

xxMAZxx

oooer nothing happens - i go to the event, accept and then the screen just flickers and nothing happens

xxMAZxx

any idea what i'm doing wrong?
the Movies folder is in my project folder
the movie is in the Movies folder
the event commnd is: Script: Scene_Movie.new("movie1")

any idea what i've missed?

Winged

It might actually need to go into a folder...I think you need to make a movie folder, I'll check

~Winged



:)

HAHAHAHA lol, it was right there read the instuctions in the script:

#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!!!
Watch out for: HaloOfTheSun

xxMAZxx

Again i say:

"the Movies folder is in my project folder
the movie is in the Movies folder
the event commnd is: Script: Scene_Movie.new("movie1")

any idea what i've missed?"

Blizzard

Should be:

$scene = Scene_Movie.new("movie1")
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

landofshadows

By the looks of things you need to name your movie cilp the same as the instance name "movie1.avi" I am  only guessing... I mean thats how the 3 picture animated Background script worked for me....
 


My RMRK Wikki:- http://wiki.rmrk.net/index.php/Landofshadows
Make a Donation for my Resource making:- https://www.paypal.me/landofshadows

superkal1

instead of
Scene=Scene_Movie.new("whatever the movie is")
Add
$scene=Scene_Movie.new("whatever the movie is")
ther we go hope it works

FruitBodyWash

#13
Sorry to NEcro post... but.... *cringe* I am having a little trouble. I created the folder Movies, put my movie in the folder, created "Scene_Movie" and pasted the code into it, and created an event that will call the script:  $scene = Scene_Movie.new("my movie"), and I get an error saying

"Wrong number of aurguments (0 for 1)"

Does the movie folder go in the graphics folder or outside it?

I'll try again, rendering the movie (its possible there's something wrong with the AVI but.... *Shrugs*)

Also, does it have to be AVI? or could I use a different movie format?

Thanks for anyone who can help, I just spent the last 18 hours slaving over this movie (though the fact that it only last 30 seconds its not obvious) I really want to play movies throughout my game.  Thanks again!

"Keep smiling, it makes people wonder what you're up to."

OK, so what's the speed of dark?
What happens if you get scared half to death twice?

Since there's a duck-billed platapus, is there just a plain platapus? If so... what does that look like?

theconqueror

Hey, If you still need help i mihgt have your solution. I have used the script before, despite me changing the folder location, it has worked for me.

After you copy and paste the script, make an event. Call Script: Scene_Movie.new("yourmovie"). Without the quotation marks it will take yourmovie as a varibale which is not specified within Scene_Movie. Despite you all saying call script: $scene = Scene_Movie.new("yourmovie") works, I have just used Scene_Movie.new("yourmovie") and it works fine for me, although saying that if it looks like it doesn't work, look at the start bar and see if your game is highlighted as if it isn't then your movie will run but you wont see anything just a blank screen.

Unless I'm using a different script which when compared doesn't seem like it. One final thought make sure the "yourmovie" is in the exact same case as it is written on the filename. This although simple is one of the most common errors, that and forgetting to put a comma. Damn syntax...

Hope that helps?

FruitBodyWash

:) thanks.  I acctually ended up giving up, then, I weeks later i tried copying and pasting it in again, all the same way, calling the script the same way, and.... viola... *shrugs* it worked.  :)

"Keep smiling, it makes people wonder what you're up to."

OK, so what's the speed of dark?
What happens if you get scared half to death twice?

Since there's a duck-billed platapus, is there just a plain platapus? If so... what does that look like?