A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Using SWF Studio 2 with Flash MX?

  1. #1
    Senior Member
    Join Date
    Aug 2001
    Location
    Seattle, WA
    Posts
    180

    Using SWF Studio 2 with Flash MX?

    Hello,

    I am wondering if someone can help.
    I am trying to create a Flash projector which can open external applications. For example, PDF file.

    Firstly, I tried to do it with "get url" function, but it wasn't the best solution because if the browser is already opened then it stays under the projector and the loaded pdf file is not visible.
    Is there any solutions to always bring browser on top of the Flash projector. I used all options such us: top, self, blank, but it didn't change anything.

    Secondly, I downloaded a trial version of SWF Studio 2 by Northcode. I am wondering if someone has any examples of how to assign the functionality to open any external applications using this software. I need to open many different files using their own applications.
    I heard this software can do it. However, I cannot find any tutorials for my case. Now, I am not sure how to create this functionality using this software. Basically, I need to assign a unique code to unique button in the Flash projector to open an unique file in the media folder. I have many files to open in the media folder.

    Any help is highly appreciated.
    Many thanks in advance.
    Best regards
    Vlad,

  2. #2
    Banned By GMF Wannabe Gambini's Avatar
    Join Date
    Oct 2000
    Posts
    976
    Hi, download a copy of Flash Studio PRO and you can launch external applications easily! Here's some sample code:
    Code:
    app = "myFile.pdf";
    fscommand ("flashstudio.exec","app");
    That's it. Also, you can load the PDF directly inside your projector!

    You can find other tutorials and help with Flash Studio PRO at http://www.multidmedia.com/support and http://www.mdmforum.com - I hope this helps

  3. #3
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Hi Vlad, thanks for trying SWF Studio!

    The ShellOpen command is what you're looking for. It uses the same method that Windows uses to open files in their native applications. All you have to do is provide the path to the file you want to open.

    If your projector is in the root of your CD and the "media" directory is as well, then this is the code you would use to open a file called "file.pdf" in the media directory.

    fscommand("shellopen", _level0.ssStartDir + "\\media\\file.pdf");

    Here are a couple more examples with different file types...

    fscommand("shellopen", _level0.ssStartDir + "\\media\\file.txt");
    fscommand("shellopen", _level0.ssStartDir + "\\media\\file.doc");
    fscommand("shellopen", _level0.ssStartDir + "\\media\\file.html");

    Just put the fscommand in the on release event for your button and you're done!

    The _level0.ssStartDir is a variable created by SWF Studio when your projector starts and it contains the path to the folder where your projector is started from. You can use this to reference files relative to your projector's location without actually using relative references (ones that start with "..\" or ".\", etc).

    SWF Studio has a generic solution for making sure anything you open appears on top of all other windows. Basically you take a snapshot of the open windows, run your command, take another snapshot and tell SWF Studio to put any window opened between the two snapshots on top. It works like this...

    // remember what's running before we call ShellOpen
    fscommand("Enum.Before", "");

    // call ShellOpen to open a browser (you can replace this with
    // anything that opens a new window (getURL, EXEC, etc)
    fscommand("ShellOpen", "www.northcode.com");

    // now find out what applications are running
    fscommand("Enum.After", "");

    // make any app opened between Enum.Before and Enum.After
    // a topmost window (on top of everything else)
    fscommand("Enum.Topmost", "");

    If you have more questions you can always stop by the SWF Studio support forums at www.northcode.com/forums. It's free and easy
    Last edited by Northcode; 02-05-2004 at 10:58 AM.

  4. #4
    >Is there any solutions to always bring browser on top of the Flash >projector. I used all options such us: top, self, blank, but it >didn't change anything.

    You can use JWeb to open the PDF in a web page to solve this problem.

    It's FREE.

    See

    http://jweb.***********.com

    For examples see

    http://www.***********.com/index.htm...aq&cPath=28_42

    To open a pdf not via a browser then use JStart

    http://jstart.***********.com

    Look at the example files given for a demo.

    Simple.

    Enjoy.

  5. #5
    Senior Member
    Join Date
    Aug 2001
    Location
    Seattle, WA
    Posts
    180
    Guys, Thank you a lot. Very helpful.
    Best regards
    Vlad,

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