RMXP with Flash capabilties V 1.0
Current Features:
- Allows for .swf files to be displayed in RMXP
Planned Features:
- Allow flash to communicate directly with RMXP (send/recieve data)
- Improve upon overall design/setup of code.
- I will be making the .exe a .dll file shortly.
Known Limitations/bugs:
- The flash files must be created by you! You must be able to edit the .fla file to get this to work!
- The flash file is played OVER the RMXP window(You can click on the title bar and continue to play your game in the background)
- There most likely will be bugs, and given the little time I have they may not be addressed promptly, please be patient.
- After the flash file has been exited the mouse will blink(Not extensively looked into but will be fixed as well)
Instructions:
- Insert the following class code in your scripts section
-Create 2 folders in your game directory
-flash
-malib
-Download the demo -Copy RMXPFlash.exe and place it into your malib folder you created.
-Create your flash file, in the first frame place the following action code.
-fscommand("RMXPCommand", "nohang") Capitalism is a must.
-Now on whatever you want the flash to exit with (A button/at the last frame whatever) place this code.
-fscommand("flashFinished", "return") Again Capitalism is a must here.
-Place the .swf into your flash folder you created.
-Now wherever you wish your flash to be displayed place the following rmxp code
-(Malib.new).playFlash("yourflashfilenamegoeshere.swf")
Thats it! Hopefully you will have successfully got your flash to work in RMXP!
If all else fails look over the demo, I have included the .fla and .swf file and setup the script to check it out.
Let me know what you all think, and look forward to updates(Albeit not that fast)
-=MalucifeR=-
Current Features:
- Allows for .swf files to be displayed in RMXP
Planned Features:
- Allow flash to communicate directly with RMXP (send/recieve data)
- Improve upon overall design/setup of code.
- I will be making the .exe a .dll file shortly.
Known Limitations/bugs:
- The flash files must be created by you! You must be able to edit the .fla file to get this to work!
- The flash file is played OVER the RMXP window(You can click on the title bar and continue to play your game in the background)
- There most likely will be bugs, and given the little time I have they may not be addressed promptly, please be patient.
- After the flash file has been exited the mouse will blink(Not extensively looked into but will be fixed as well)
Instructions:
- Insert the following class code in your scripts section
Code:
$library_dir=(Dir.pwd).concat("/malib")
class Malib
def playFlash(fileName)
if(File.exist?((Dir.getwd).concat("/flash/").concat(fileName)))
tempDir=(0.chr)*255
Win32API.new("kernel32", "GetTempPath", ['L', 'P'], 'L').call(254, tempDir)
tempDir=tempDir.delete(0.chr)
tempDir=tempDir.tr("\\", "/")
filenum=1
tempFileDel=tempDir+"RMXPFS"+(filenum.to_s)+".maltmp"
while(File.exist?(tempFileDel))
filenum+=1
tempFileDel=tempDir+"RMXPFS"+(filenum.to_s)+".maltmp"
end#while
createTempFile=File.new(tempFileDel, "w+")
createTempFile.close
myLibShell=$library_dir+"/RMXPFlash.exe "+fileName
myLibShell+="malstrsplit"+tempFileDel
Win32API.new("kernel32", "WinExec", ['P', 'L'], 'L').call(myLibShell, 1)
flashWaitTimer=Thread.new do
loop do
if(File.exist?(tempFileDel))
Graphics.update
sleep(0.75)
else
flashWaitTimer.stop
end#if
end#loop
end#Thread
end#if
return
end#def
end#class
-Create 2 folders in your game directory
-flash
-malib
-Download the demo -Copy RMXPFlash.exe and place it into your malib folder you created.
-Create your flash file, in the first frame place the following action code.
-fscommand("RMXPCommand", "nohang") Capitalism is a must.
-Now on whatever you want the flash to exit with (A button/at the last frame whatever) place this code.
-fscommand("flashFinished", "return") Again Capitalism is a must here.
-Place the .swf into your flash folder you created.
-Now wherever you wish your flash to be displayed place the following rmxp code
-(Malib.new).playFlash("yourflashfilenamegoeshere.swf")
Thats it! Hopefully you will have successfully got your flash to work in RMXP!
If all else fails look over the demo, I have included the .fla and .swf file and setup the script to check it out.
Let me know what you all think, and look forward to updates(Albeit not that fast)
-=MalucifeR=-