The Daily Click ::. Forums ::. Klik Coding Help ::. include external files
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  531

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
10th March, 2008 at 07:53:55 -

I thought it was a long shot, but assumed it would do what it says on the tin. Basically I enabled the option and built the application which contained an .avi video file. When I opened the application it said something along the lines of it not being able to find the .avi video file. So, what does the include external files option do?

Image Edited by the Author.

 
Image

Tell 'em Babs is 'ere...

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  531

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
12th March, 2008 at 13:59:29 -

Image </img

 
Image

Tell 'em Babs is 'ere...

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
12th March, 2008 at 14:14:34 -



I'd love to know too. there are a couple of external files I'd like to stick into the .exe. Right now even though I'm using some internal file coding or something I still have to bundle the .bmp externally from the game.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
13th March, 2008 at 04:31:02 -

You can use the include binary files option... I just don't know the in's and out's; ask at Clickteam?

 
Image
http://bfollington.tumblr.com

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
13th March, 2008 at 06:13:23 -

To include a file, you need to reference its complete path. So, case study:

You have a game, called mygame.mfa, located in "c:\games\my game\"

You have your video in "c:\games\my game\vids\video.avi"

Normally, you'd refer to the video like this:

appdrive$+appdir$+"\vids\video.avi"

HOWEVER, MMF's too thick to read that.

You need to open it from the full path, using a file selector. eg:

On Start of Frame
--- Play video: "c:\games\my game\vids\video.avi"

When you build to a standalone exe, MMF will find all the files you selected using File Selector dialogs and build them into the exe. So all your absolute references become internal references.

Some extensions don't have a file selector action to open a file. They just prompt an expression editor. This, obviously, won't get built into the game.

So, to deal with it, we use array object, and do this:

NEVER
--- Array: Load array file "C:\path\folder\file.mpg"

Array object has a dialog, so doing this will work almost like a 'load' command. It's enough to force MMF to include the file when it builds, even though the event itself won't be handled at runtime.

Now, I have a feeling that to refer to this file from here on in, you have to simply type:

"file.mpg" in order to load it. I THINK that's how it works.

 
191 / 9999 * 7 + 191 * 7
   

Post Reply



 



Advertisement

Worth A Click