Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RMXP meets Flash v1.0

Status
Not open for further replies.
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
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=-
 
Can't you just convert AVI, WMV or any other video format to .SWF with the SUPER media converter?
Or would that not work because you said you have to be able to edit the flash for this to work.
 
Hey not a problem glad a bunch of you like it, Ill be improving it further in the future as Im relocating right now I wont be on for a few days, so hang in there :) Ill keep you all posted!
 
That is awesome.. I had previously created a battle system in flash, and now I can actually integrate it with RMXP if I desire.  Wicked Awesome.  This would be perfect for 1st person shooters and more.

Great work!
 
@Xilef Technically if the AVI etc is your content you can legally convert it to flash and decompile the swf to edit it, but I'm not going to get into how you go about doing that.

@Sles Reason being is this was my beta attempt to integrate flash with rmxp in a simple manner that would prove effective for the time being.  I am however working on this issue and it will be fixed in due time.

@saikyo765 Your mind is the limit my friend! Technically yes you could really make a flash game and integrate it in with rmxp, but you need to know flash has alot of security issues, you would have to obfuscate the code etc. I am working on a method to retrieve values from the flash to RMXP at the moment, this won't be any time soon. As for now you could always use flash to output values to a file, then use rmxp to read from the file to inherit any values you wanted.

Again Ill keep you all posted! (And Gubid thanks for your comment and BTW I love your battle system! After your next update  I will be configuring it to work with my Netplay+ 2.0 game :> )
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top