dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: Bundle .exe and all linked files

  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    74

    Bundle .exe and all linked files

    I don't really know what the proper term for this would be - but I'm sure its possible somehow:

    I have an .exe which uses loadmovie to load in lots of additional .swfs, quicktime movies, images, etc...

    What is the best way to bundle all of that into ONE FILE that I could distribute... instead of the .exe and a complete directory of linked items? Is there a plugin or something you could recommend?

    Thanks!

  2. #2
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You can't do it with Flash alone, but there are some third part SWF to EXE tools out there that you can use to do this.

    The best...

    SWF Studio http://www.northcode.com (my baby)

    And the rest

    mProjector http://www.screentime.com
    SWFKit http://www.swfkit.com
    SWiSH Studio http://www.swishzone.com
    Jugglor http://www.jugglor.com
    Zinc http://www.multidmedia.com

  3. #3
    Member
    Join Date
    Jan 2007
    Posts
    74
    Thanks, Tim.

    So, Northcode is your company? Sounds like the best option. Is it pretty easy to learn? I'm not a very advanced scripter... so I don't want anything too complicated.

    I'll download the trial and take a look...

  4. #4
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    So, Northcode is your company?
    Yeah, so I'm a little biased

    All you should have to do is...

    [1] Drag and drop your main movie onto the SWF Studio IDE. It will ask you if you want to make that SWF the new main movie. Click YES. See Building Your First SWF Studio Application (less than 10 mins) for a nice gentle intro.

    [2] Drag and drop all your files (or the folder containing them) onto the Files Tab.

    [3] Change the Default Base Path on the Movie Tab from "use the folder where the projector is started from" to "use the autoextract folder"

    Press the Build button to create a new EXE and give it a try. You shouldn't have to make any scripting changes for just loading SWF files, images, etc. You might have an issue with loading QT movies into an FLV playback component, but if you do I can help you sort that out

  5. #5
    Member
    Join Date
    Jan 2007
    Posts
    74
    So, Tim... I tested Northcode and it works great. I think its exactly what I need.

    One request: would it be possible to code something into it that would canabalize the screen resolution and set it to a match the main .swf? For example... Instead of making things go 'full screen' - the screen resolution would simple SET to 1024x768 - thus making the contained movies seen at 'original size'. When you exit, it would then revert back to the screen resolution that was previously set.

  6. #6
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You mean something like ssCore.Desktop.changeResolution?

    It's pretty tough to use though

    Code:
    ssCore.Desktop.changeResolution({width:1024, height:768, colorDepth:32});
    I'm just guessing here but are you a Firefly fan?
    Last edited by Northcode; 02-10-2010 at 01:49 PM.

  7. #7
    Member
    Join Date
    Jan 2007
    Posts
    74
    I'll have to try that out.

    Yes, I think the name "Captain Tightpants" was inappropriate to have on my work computer...

  8. #8
    Member
    Join Date
    Jan 2007
    Posts
    74
    Northcode:

    I watched your getting started video - and I love your PDF linking through SWF studio. So, I am trying to use that in my file now. My PDFs are all collected into a folder called, "spec_pages" which is in the directory of the main swfs. I add this code to my button, but it doesn't work:

    on (press){
    ssCore.Shell.invoke({path:"startdir://spec_pages/Pool.pdf"});
    }

    What am I doing wrong?

    Also, I added the ssCore.Desktop.changeResolution to my main swf - but it doesn't do anything. I just added it to the first frame of the movieclip - do I need to do something else?

    Is there a way to add a loading bar to the slash screen? That would be a nice touch...

    Just trying to get everything in order - so I can get HR to give me the go ahead to purchase SWF studio - I have to prove its worth first though. Very nice program!

  9. #9
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    The / should be \\

    ssCore.Shell.invoke({path:"startdir://spec_pages\\Pool.pdf"});

    If you're calling Desktop.changeResolution and it's not doing anything then it should be giving you back some error information. Try this...

    Code:
    ssCore.init();
    ssDefaults.synchronousCommands = true;
    
    var r:Object = ssCore.Desktop.changeResolution( { your arguments });
    
    if (r.success)
       ssDebug.trace("OK");
    else
       ssDebug.trace(r.Error.description);
    If you change your splash screen to a SWF you can put an animated "loading" bar in there. You can communicate with the splash screen SWF as well so you can tell it when to update once the main app gets going (before that you don't get any info on how far things are into the loading process).

  10. #10
    Member
    Join Date
    Jan 2007
    Posts
    74
    I copy/pasted your code for the open PDF - and it still doesn't work. Tells me: "There was an error opening this document. The path does not exist." I'm using AS2 - does that matter?

    Still no luck in the ssCore.desktop.changeResolution code either.

    My Splash Screen is a .swf. If I play just the .swf - it animates... but once it is compiled via SWF Studio - the splash screen is stationary - it never animates.

    hmmmm...

    I'm not generally a 'programmer' - more of a designer with a tiny little bit of programming ability. Thanks for your help. I'm going to try to read through some more of your help files and see if I can figure anything out.

  11. #11
    Member
    Join Date
    Jan 2007
    Posts
    74
    okay - update...

    I used this code and its now working:

    ssCore.Desktop.changeResolution({width:1024, height:768, colorDepth:32, useDirectDraw:true});

    hmmm...

    I didn't even change anything on the open PDF code - but now its working too.... odd.

    Splash Screen still not animating...
    Last edited by Captain Mal; 03-15-2010 at 04:37 PM.

  12. #12
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I copy/pasted your code for the open PDF - and it still doesn't work. Tells me: "There was an error opening this document. The path does not exist." I'm using AS2 - does that matter?
    It doesn't matter what version of ActionScript you're using. The error you're getting is saying that it can't find the PDF file. Let's try a dead simple test. If you put "Pool.pdf" in the same folder as the EXE you created with SWF Studio and use this commadn ssCore.Shell.invoke({path:"startdir://Pool.pdf"}); does the PDF file open?

    If you send your splash screen SWF file to support@northcode.com I'll have a look and see if there's anything odd that's preventing it from animating.

  13. #13
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    i just took your splash screen and used it in a new project flashkit_pdfsplash.zip that shows the splash screen animating and than allows you to play around with invoking a PDF file from various paths.

    I told SWF Studio to only display the splash screen for 3 seconds, but if you uncheck that box it just keeps animating until you dismiss the application.

  14. #14
    Member
    Join Date
    Jan 2007
    Posts
    74
    Ah, I think I know what I was doing wrong... I only had '1 second' in the display box. I thought this was how long to display AFTER the application started, because when I first tested it - the splash screen never went away once the app was loaded.

    I'll try that again in the morning... I bet thats it.

    Thanks again!

  15. #15
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You can leave that option unchecked and have your app call ssCore.Splash.close({}) once the startup code is done, that will always dismiss the splash screen at the right time.

  16. #16
    Member
    Join Date
    Jan 2007
    Posts
    74
    Hi Tim -

    I downloaded your test file and compiled it locally - it still worked - the splash screen animated. Then, I replaced your main movie with my main movie... and the splash screen no longer animated.

    I seems like since I am loading tons of files that it makes the splash screen hang... once all the files are loaded it does progress to frame two of the animation, but only for a split second before it unloads (using the ssCore.Splash.close({}) code)

    Have you had any problems with this before? My total .exe is 230mb or so... and takes about 10 seconds to load.

    Any other ideas?

    Thanks,
    Marty

  17. #17
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    How are you loading your files?

  18. #18
    Member
    Join Date
    Jan 2007
    Posts
    74
    I add my main swf into the "main movie" slot - then I add the rest of my linked files into the "files" tab. Its working fine.

    I just did a test - turned on the checkbox for "automatically close the splash screen after the main movie is loaded after a minimum of 5 seconds". And I commented out the //ssCore.Splash.close({}) code.

    Now the entire things begins to load - the splash screen hangs at frame 1 - then, when the everything is loaded, the splash screen animates for 5 seconds and then goes away.

  19. #19
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    If you have 230MB of files that are being automatically extracted at startup then that's likely why the splash screen appears to be hung. The loop to extract those files is pretty tight and doesn't give the rest of the app much CPU to do anything else.

    What you can do instead is mark all those files on the Files Tab as "No AutoExtract" and extract them yourself in code. I haven't tried that but it should give your splash screen more time to breathe and you can also send data to the splash screen saying "please wait, extracting i of n files..." or something.

    Once the files are extracted you can continue with the guts of your main SWF and load them. I'm guessing it's the extracting and not the loading that's taking all the time.

    I'll see if I can reproduce the issue you're seeing and then I'll whip up a little example to do the extraction of a bunch of files manually and see if that fixes it.

    Stay tuned...

  20. #20
    Member
    Join Date
    Jan 2007
    Posts
    74
    I really appreciate all your help. If I can get the workflow down, I'll be using SWF Studio for all my work in the future...

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