dcsimg
A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: Need help! Problem with publishing EXE!

  1. #1
    Junior Member
    Join Date
    Nov 2004
    Posts
    14

    Need help! Problem with publishing EXE!

    Guys! I need help with a projector file that I'm making. This is a Program for Grade 3 Math and it has 43 chapters, each lesson containing a 1-3 minute animated clip about the topic. Since it is a huge clutter, I made 3 main menus (1-15,16-30,31-43) and I subdivided each lesson into 4 parts: the intro which slides the animation window and plays the audio title, the actual movie, the menu which gives the option to watch the movie again or go back to the menu<which will play the ending first>, and the end which slides out the animation window and goes back directly to the main menu).

    The problem is when I test the movie or publish it as exe. The first 15 lessons go smoothly and the navigation between menus 1,2 and 3 are ok but when I play lesson 17 the movie clip stops mid-movie or when I play lesson 18-43, only the first frame appears. This shouldn't happen since I simply duplicated a blank template I used for Lessons 1-15 and used it for 16-43. I also checked and double-checked the action I put for each frame and button. 16-43 has the same syntax as 1-15 so in logic, they should also be working. I was thinking that it was my slow-ass PC that was the problem (I used my pentium3 500 with 128mb ram) but that wasn't the problem since I tried testing and publishing it with my newer PC (pentium4 2.24 with 256ram) and it still had the same problem. I was thinking it the problem had to be with my flash software (flash mx 6) but when I enable simple frame actions and simple buttons in the environment, it did everything I asked it to do and worked out great. What am I doing wrong!!! I'm not exactly a flash newbie (I've been working on flash for 3 years now) and I know what I'm doing is correct but I've been stuck with this problem for over a week now! HEEEEELLLLLLLPPPPPPP!!!!!!

  2. #2
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    Guys! I think I solved it though I have yet to test it. I've been reading up on Northcode's proxie.exe and a few other threads and I think I've figured out a way to fix my problem. Tell me if I'm correct. I'll split the big file into smaller files (from program.exe to menu1.exe, menu2.exe, menu3.exe) and just call the navigation going to the other menus using fscommand "exec" and the rest of the process required for calling proxie (to remove the pop-up). I'll have to test it first though.

    Wish me luck!!!

  3. #3
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    I finally got my program to work. All lessons are runnning properly. What I did was split my huge program into 4 smaller EXEs and they finally worked (which makes absolutely no sense to me).

    Now I have a new problem. If anyone here can help me, I have a question about north's proxy.exe.

    Based on nycomets situation in a different thread here, he used north's proxy.exe to launch a .pdf file. Now my question is this: I have 3 smaller EXEs, each containing a button to go to one another.
    I used proxy.exe and it worked out fine in opening each small EXE individually. Is it possible that when I click the button to go to the other EXE, the current one closes and the desired one opens.

    these are the codes I put in:

    ===========================
    on (release) {
    stop
    fscommand ("exec", "menu2.exe");
    fscommand ("quit", "true");
    }
    ===========================

    this is presuming I want to go to the second menu and close the current one. The menu2.exe is the "proxy.exe" which i renamed.
    I made a .bat file that had this in:

    ===========================
    START fscommand\menu2.exe
    ===========================
    this is the case since I had all all the original EXEs in a subfolder "fscommand". My .bat and proxy files are not in the subfolder "fscommand" but I used a folder "myprogram" and in it were the .bat files and the renamed proxy files and the subfolder "fscommand".


    If any of you guys can help me out with this it would be great!

  4. #4
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You don't really need to use proxy to launch another Flash projector because launching them won't display the DOS box that proxy was designed to hide. So you can load menu2.exe (your projector) directly from the fscommand folder.

    The problem you're going to have is launching another EXE file because once you start menu2.exe, the current directory is the fscommand folder so if you exec something else you're going to need to put that EXE in the fscommand folder IN the fscommand folder you're already in.

    The only solution I can think of without resorting to a third party application is a bit tricky...

    caveat coder I haven't actually tried this, but I can't think of any reason why it wouldn't work...

    Code:
    +-- menu1.exe
    |
    +-- menu2.exe
    |
    +-- <fscommand>
    	|
    	+-- menu1.exe
    	|
    	+-- menu2.bat
    	|
    	+-- menu1.exe
    	|
    	+-- menu2.bat
    The menu1.exe and menu2.exe files in the root of the CD are flash projectors. The menu1.exe and menu2.exe files in the fscommand folder are renamed copies of proxy.exe and the bat files look like this...

    Code:
    rem this is menu1.bat
    \menu1.exe
    Code:
    rem this is menu2.bat
    \menu2.exe
    Now for the explanation...

    When you say fscommand("exec", "menu2.exe") from menu1.exe (in the root) you are actually running the copy of menu2.exe from the fscommand folder which is the renamed copy of proxy.exe so it runs menu2.bat which launches menu2.exe from the root of the CD.

    This way you keep all your Flash movies in the root of the CD and you have one renamed copy of proxy.exe and one bat file for every EXE you want to launch. The BAT file takes care of launch the Flash EXE from the root of the CD so.

    Your Flash movies "think" the exe files they are launching are in the fscommand folder and the proxy exe and bat files take care of the dirty details of launching the correct EXE file.

  5. #5
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    Whew! Thanks North! You da man! I think this will probably work so I'll give it a shot and see if it goes. Hopefully it'll run after I apply the solution of grandmaster jedi northcode! Wish me luck.

  6. #6
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    Aaarghh! Help north! It still won't work! I followed your's instrcutions to the letter and nothing happens. I tried adding a
    fscommand("quit", "true) after fscommand("exec", "menu1.exe") and all it does is close the window. The "exec" doesn't seem to work. I did everything including putting the .bat and renamed proxy files in a subfolder "fscommand". I have a question though.. what does this code actually do anyway?

    --------------------
    rem this is menu1.bat
    \menu1.exe
    --------------------

    what's the rem for?
    why doesn't the fscommand("exec".... work?


    Anyway if you guys have any more suggestions I'd appreciate it. As for me I'll all solutioned-out. Thanks!

  7. #7
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    REM is short for REMARK and it's how you add comments to BAT files, like // in ActionScript... it does absolutely nothing. I put the REM in the BAT file so you could tell them apart in case it wasn't clear from the different EXE names.

    The most likely culprit causing this to fail is if you're not running it from a CD or the root of a hard drive. The paths I used in the BAT files is "\filename.exe" which means Windows looks in the root of whatever drive you're using for filename.exe.

    The proxy/bat file combination is necessary because...

    Let's say you wanted to launch menu2 from from menu1, no problem just fscommand("exec", "menu2.exe") and put menu2.exe in the fscommand folder. No problem.

    Now, what if you want to go back? You can't. When you call fscommand("exec", "menu1.exe") Flash looks in the fscommand folder for menu1.exe but that means you need an fscommand folder inside your fscommand folder.

    It gets worse if you want to go back to menu2 again, you end up with nested fscommand folders and you'll need an infinite number to support whatever the user might try

    The BAT file solution gets around this by running menu1.exe and menu2.exe from the root of the CD so all you need in the fscommand folder are placeholders that launch the correct file. No nesting required.

  8. #8
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    thanks north. I have a question though.

    since i used fscommand("exec", "menu1.exe") in the file in the root folder, should i use START \menu1.exe or just \menu1.exe for the bat files in the subfolder?

  9. #9
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    Yey! Thanks Northcode! I finally got the directory structure right. Here's what I did...

    in the root directory (C: or the cd drive D i put in my projector EXE files. In these files were buttons going from one menu to the next (menu1, menu2, menu3). For these i put in
    fscommand("exec", "menu1")and so on...

    next i created a subdirectory (another folder) in the root directory and named it fscommand. in this folder I put in renamed proxy files (from proxy.exe to menu1.exe, menu2. exe and so on...) and .bat files.
    here is the code i put in for the .bat file...

    =================
    START \menu1.exe
    =================

    the "\" will direct the .bat file to the root directory thus starting the indicated program.

    I have a question though.... For example I opened menu1.exe (the projector file) and it calls the renamed proxy and this calls the bat thus invoking the next EXE, how do I get the current EXE to close and still open the next desired EXE. What happens in my case is that when I try to open the next EXE, the current window is still open so when I go back and forth from one menu to the next, the EXEs get stacked up and significantly slows down the pc. (and it's just plain ugly and messy)

    I tried doing the following things and here's what they do...

    - added an fscommand("quit", "true") before the
    fscommand("exec", "menu1") and all it does is close the EXE. I'm
    assuming all this does is close the program before it even gets
    the chance to perform the next command.

    - added an fscommand("quit", "true") after the
    fscommand("exec", "menu1") and all it does is close the EXE. This
    simply closes the program and the next one doesn't open.

    Is there anyway I can close the current EXE while at the same time opening the next one that I want to open? I'm assuming a .bat file command has to be added to the current .bat files for each EXE but I have no clue on how to do it.

  10. #10
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    It takes a couple of ticks for the new EXE to start when you EXEC it, but if the QUIT command executes too quickly it can kill the EXEC command. It's strange, but I have seen it happen. So you have to put the call to QUIT after EXEC and delay it a bit. The easiest way to do this is to wrap up the call to QUIT like this...

    Code:
    function delayedQuit()
    {
       setInterval(function() { fscommand("quit", ""); }, 1000);	
    }
    Just drop that function in frame 1 of your main timeline and call it instead of calling fscommand("quit", "") directly. You can make probably make the interval shorter than 1000 msec (1 sec) but that should definitely do it.

  11. #11
    Junior Member
    Join Date
    Nov 2004
    Posts
    14
    Cool! Thanks north! I'll ceratainly give that a try. Thanks for all your help and patience!

  12. #12
    Junior Member
    Join Date
    May 2003
    Posts
    14

    mpg's and applescript

    Hi there.

    Hope you're still watching this thread, really in need of some help. I'm creating a hybrid cd-rom where the user is allowed to view a number of files, some of which are pdf, other pps and finally some mpg. On the pc-side I'm using Northcode's proxy.exe and absolutely love it, does everything I need it to do. On Mac's side I use applescript and it almost works, ie I can open the pps and pdf but nothing happens when I try to open mpg. Do you have any idea why this could be?
    Here's my applescript:

    *********** the applescript ************
    tell application "Finder"
    activate
    select file "Sigga.mpg" of folder "mpg" of folder "fscommand" of disk "Fabrikan"
    open selection
    end tell
    ****************************************

    exactly the same as for both pdf's and pps (swap mpg for those names).
    Can somebody help me please?! I'm in desperate need, preferably have to hand the cd over to the customer before the weekend!

    Thanks in advance!
    BK

  13. #13
    Junior Member
    Join Date
    May 2003
    Posts
    14
    Hrmpf, it only needed to be .mpeg instead of .mpg. Guess some solutions are so easy you don't think about them. Oh well, got it!

  14. #14
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    Northcode,

    I finally found this thread and I have one question. I need to open a pdf to a specific page.

    So in my BAT file I tried mypdf.pdf#page=8. When I press my button in flash a window pops up and says it can't find the pdf. The pdf, bat file and proxy file are all located in the fscommand folder, at least temporarily.

    Is there a way to pass the page parameter?

  15. #15
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    It's the "#page=8" part that's causing the problem. That's how you jump to a named anchor in HTML, but it doesn't mean anything to the Acrobat Reader so it just treats it like part of the file name. I don't know of any way to tell the Acrobat Reader to open the PDF to a specific page on Windows. If the Mac version of the Acrobat Reader is scriptable, then you might have a chance on a Mac with AppleScript.

  16. #16
    Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Post Problem launching an exe from nested folders

    Sorry for the confusing setup but I am not a programmer so I am trying to explain my setup...

    I am creating a CD-ROM that is going to autorun IntroMenu.exe

    Inside of the executable IntroMenu.exe are buttons that I need to have launch separate exe files located in subfolders on the same disc.

    My buttons have the code[ on (release) {fscommand("exec", "cmv.exe");}]

    In the root directory there is a folder named fscommand and in that folder I have saved the renamed proxy file cmv.exe as well as a batch file called cmv.bat

    The code for cmv.bat [START \bin\cmv\cmv.exe]

    What I am trying to accomplish is having the batch file open an executable that is nestled in a couple of subfolders but it is not working. The directory structure looks like this:

    Root:
    IntroMenu.exe
    autorun.ini
    -bin
    --cmv
    ---cmv.exe
    -fscommand
    --cmv.exe
    --cmv.bat

    What am I missing here? I think perhaps the error is in the code on the batch file, but there are so many variables and all my trial and error fixes are not working.

  17. #17
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Are you trying to use AS2 or AS3?
    From the example code you posted it looks like AS2.

    What version of the Flash player are you using?

    What version of proxy.exe are you using?
    It should be 3.1.0.0 from here

  18. #18
    Junior Member
    Join Date
    Oct 2009
    Posts
    3
    pardon my slowness here... I'm not really a programmer but I have been tasked with programming so I'm a little slow on the lingo. I believe it's AS1. I'm working from Flash 8 and had set publishing options to Flash Player 5. Is that maybe where my trouble is, with compatibility?

    ** Yes I am using the correct version of the proxy. I just downloaded it yesterday **

    *** Also it might be important to note that the buttons are located inside of a movie clip. I don't know if that makes a difference, but I thought I would mention it just in case. ***

    The error that I'm getting when I click a button in my IntroMenu.exe file is: Windows cannot find '\bin\cmv\cmv.exe'. Make sure you typed the name correctly and then try again.

    That is why I think the error is in my batch file, but that is definitely the directory structure, I just don't really know batch syntax.
    Last edited by glitchy; 10-15-2009 at 01:32 PM.

  19. #19
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    It doesn't matter where the code is (inside a movieclip or not). I'll whip up a little example for you using Flash 8 and targeting Flash 5 (any reason you did that?) and post it here when it's done.

  20. #20
    Junior Member
    Join Date
    Oct 2009
    Posts
    3
    YEAH!!! I figured it out. Since the proxy was working and the problem was in my .bat file, I decided to play just with that. I moved my entire /bin directory and subfolders INSIDE of the fscommand folder and then edited my batch file code to:[START bin\cmv\cmv.exe]

    I basically just removed the '\' before bin. Now it works like a charm!

    Thanks for making a viable solution with the proxy. It's great!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center