Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autorun a CD-R with Flash exe Menu and Flash exe Game Icons

Status
Not open for further replies.

Chris99

Technical User
Jan 11, 2001
18
CA
Hi everybody, I'm wondering if anyone here has ever tried to do the following successfully. When you buy a game for PC, after you insert the CD-ROM, it starts playing, a menu shows up, you can do stuff, and if you want, you can usually get back to that opening menu. I would like to be able to do the same thing. I apologize for the wordiness of this - it's kind of complicated ;) !

I use Flash MX. I've made 4 games that I'd like to share with friends and family by burning them on a CD-R and mailing them. To make sure everyone can see the games I will publish the games as EXE's (Flash Projector for Windows built in). There will thus be 4 game exe's plus an "intro" exe, for a total of 5 flash exe's.

I want the CD-R to play soon as they pop it in the drive, so I will put an autorun file on the CD-R that points to the "intro" exe.

The intro will display text saying "hi, here's the games. To play a game, just click on the appropriate button!". Below the text will be 4 buttons, one for each game.

Thus the contents of the CD-R will look like this: 2 files and one folder, namely: the autorun.ini, the intro.exe and a folder labelled fscommand. Within this folder will be: game1.exe, game2.exe, game3.exe, and game4.exe. For those who don't know, in FlashMX, if you want to use fscommand exec you have to put the applications in a subfolder called 'fscommand' that is in the same directory as the projector. This is supposed to help prevent malicious use.

If, for example, someone clicks the 1st game button on the intro menu, game1,exe will run and game one will appear because on that button was scripted:

on(press){fscommand("exec","game1.exe")}

I have tested this out and it works fine. The Problem:

What to do with the intro.exe still existing once game1.exe runs? I could just get rid of it by scripting 'fscommand("quit")' when a person clicked on any of intro'exe's game buttons. But then what happens when a person closes the game? There would be nothing at all and it would be great if intro.exe was still there so they could then select another game to try. Couldn't I just leave the intro menu 'open' while any game is playing since it isn't really doing anything except displaying the welcoming message and 4 buttons, right? Is it alright to have more than one projector playing at once?

Or is there a way, when someone exits a game, for the intro exe to be run again? There seems to be a dilemma. To be able to use fscommand exec within a game to get the intro.exe going, the intro exe itself would have to be in the same folder as the game.exe itself, which is illogical since the games are already in a subfolder within the intro.exe's directory. I suppose that all a person would have to do when they quit a game is just double click on the drive again to get the autorun going and then the intro exe would show up.

Does anyone know a way around this? Also, is there a way, once autorun plays the intro exe, to allow someone to see the CD-R's contents, other than the person having to right click and select "open" to see what's on the CD-R?

Thanks in advance for any advice on this matter, much appreciated :) !

I want to Learn :D !!
 
You asked a LOT of questions. I'll try my best to answer them all.

>> What to do with the intro.exe still existing once game1.exe runs?

Is there really a problem with that? Your user probably will not mind a menu in the background. They can just minimize it.

If it really is a problem, look at loadMovieNum or something, to load the second SWF into the same projector.

Will
 
Hi Will, thanks for the advice, and yeah, that shouldn't be a problem having two EXE's playing at the same time (not swf's). I could use fscommand to make they all play fullscreen so as to hide the menu. I was more concerned with performance issues actually.

But actually, it just occurred to me that maybe there isn't any need for there to be 5 exe's. The 4 games could just be swf's loading into intro.exe's built-in projector. That way, wouldn't it still guarantee that everyone could see the games - and also that way when they quit a game, the game menu would still be there.

Many times I've sent people swf's in emails or on a floppy and they couldn't see them and had trouble configuring their browsers. Bye for now :)

I want to Learn :D !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top