A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Operating System Check

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    6
    Hi I have been creating a CD using flash mx. I am using the fscommand to run a batchfile which opens a document. Everything works fine except that when a batch file is run on windows 9x version it will not close even if using the exit command. The user has to press the close button. I am using the fscommand because on windowsxp if using get url a prompt is appearing. Is their anyway that I can check the operating system & if nt/win2k/xp run the fscommand & if 9x run the geturl. Or if you no another solution please let me know

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    219
    You might want to consider using this :

    http://msdn.microsoft.com/library/de...entid=28001169 instead of Batch Files....

    or use one if the many third part tools out there...

    Flash 'N pack is one of them... these tools allow you to do a lot more then ust launching files and you don't have to use any Btach files with them...

    Check it out.. http://www.flashnpack.com and download the FREE trial version to see for your self... unleash the power of Flash use Flash 'N pack.

  3. #3
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    If the Win 9x platform is causing you problems, stay away from WSH. It didn't exist in the Win 95 time frame and it probably won't be on the majority of Win 95 systems that have survived until today. WSH 1.0 started shipping with Win98 but it's a different beast from what WSH is today.

    I haven't tested this (so I can't be sure it will work) but you can try running the bat file from inside a DOS shell. That might get around the DOS box that stays open after running a BAT file directly.

    fscommand("exec","cmd\t/C\tdothis.bat); // NT,2K, XP
    fscommand("exec","command.com\t/c\tdothis.bat); // 9x,ME

    The first fscommand will only work on NT, 2K and XP systems where CMD.EXE exists, it won't do anything if you run it on 9x and ME systems.


  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    266
    saint_xt, as you mentioned you use MX, I think Northcode's code which run perfectly in Flash 5 will not run for you.

    For OS detection, you can check System.capabilities.os. You can go to Actionscript dictionary and look in System object to have more information.

    To completely get rid of the dos box, you can try using some third parties tool.

    http://www.flashgeek.com/tutorials/07_launchapp_01.htm

    is a free one suitable for those case that filename is static and file number is small.

    If you want to have more control, you can also try using LPFlashEx which is very low cost and combine many functions.

    The standard version cost only US$20 and it include many fucntions to control the file system, control your own flash window , dialogs and so. PRO version also allow you to control the window of other applicaiton, load and control media and PDF file in your flash code and more.

    You can have a quick look of a few of sample here :

    http://www.lpflashex.com/dl/ExternalApp.zip (93KB) - Controlling external programs and even stick them to your stage.
    http://www.lpflashex.com/dl/Explorer.zip (54KB) - get 20+ types info of file system and do 20+ operation on it.
    http://www.lpflashex.com/dl/ExplorerFla.zip (19KB) -explorer sources file.

    [Edited by Justmade on 07-13-2002 at 07:17 AM]

  5. #5
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    Yep, I missed the MX reference

    If you don't NEED any features of Flash MX you can switch back to Flash 5. If you NEED Flash MX, that limits your options to either a canned third party solution or a custom solution to get around the problem).

    You can hire a programmer or build this EXE yourself with very little effort using Flash 5! You don't even need a copy of Flash 5 to do this. There are lots of free tools for Flash 5 that will give you the power you need. Here's how it might work...

    Set Flash MX to publish a Flash 5 format SWF file then download a copy of FlashPla.exe and use that to create an EXE from your Flash 5 SWF. You can use the trick I described above to launch BAT file from this EXE and there's no problem calling a Flash 5 projector from a Flash MX projector!

    If that sounds like too much work, here's a list of all the third party tools I know of that work with Flash MX.

    SWF Studio http://www.northcode.com (my product)
    Jugglor http://www.***********.com
    LPFlashEX http://www.logicplus.com.hk
    FlashAnts http://www.flashants.com
    mProjector http://www.binarynoise.com
    Flash 'N Pack http://www.flashnpack.com
    Flash Studio http://www.multidmedia.com

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