Categories
Featured jobs
» More ActionScript, Flash and Flex jobs.
» Advertise a job for free
Our network
Advertisement

 »  Home  »  Tutorials  »  Flash  »  Beginner  »  Execute Files from Local Presentations

Execute Files from Local Presentations

By Jesse Stratford | Published 09/9/2005 | Beginner | Rating:
Jesse Stratford
Jesse lives and works in Melbourne Australia. He is the Cofounder and a Director of http://ActionScript.org. A Flash enthusiast, teacher, author, freelancer and speaker Jesse enjoys participating in the http://ActionScript.org community and the wider Flash scene when he has time. 

View all articles by Jesse Stratford
Page 1 of 1
Written by: Jesse Stratford
Time: 15 minutes
Difficulty Level: Beginner
Requirements: Flash 4 or higher.
Topics Covered: fscommand(), start.exe.
Assumed knowledge: None.

Flash player changes & their impact upon this tutorial:
Before we begin users should note that Macromedia altered the access EXEC has to the system to prevent malicious coders from causing trouble. Executables must now exist within a specific directory. Read this article at Macromedia's help site for information about where to put your executable in order for it to comply with these security restrictions.

These changes nullify the usefulness of the old version of this tutorial somewhat. The "start" executable which this tutorial relied upon resides in the Windows directory and, as such, can't be made to comply with Macromedia's directory structure security requirements. For Windows systems you can however create a batch file (.bat) which invokes the start executable, then put this batch file in the correct directory. For Mac systems you can use Apple Script in the same manner. Both of these are mentioned at the link Macromedia help article above but not discussed in any detail.

This tutorial now provides an example of using a Windows batch file to execute files from locations other than the 'fscommand' directory. Windows users, grab this Flash MX source file and take a look. If someone wants to send me a working Apple Script example via email, I'll post it here too.

The old version of this tutorial (who's methods cannot be applied in any version of the Flash standalone player above Flash 5) has been moved to the Archives area of the Tutorial section; see the Tutorials index for a link to it if you need it.


How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent

Verification:
Enter the security code shown below:
img


Add comment

Spread The Word / Bookmark this content

Clesto Digg it! Reddit Furl del.icio.us Spurl Yahoo!

Related Articles
Comments
  • Comment #1 (Posted by Rodolfo - rodo2087 at yahoo.com.mx)
    Rating
    Yeah, your example really helps when trying to open some pps xls or some exe's ! but, i would like to know if there is any way to open this kind of documents withouth having to see the MSDOS window. like opening the MSDOS window under the other windows that may be open.
    Great Tutorial!
    Thanks!
     
  • Comment #2 (Posted by Rudi Britz - rbritz at compuprint.co.za)
    Rating
    Yeah, there is another way! Try the following...

    on (press) {
    getURL("file:///C:/Program Files/Microsoft Office/OFFICE11/OUTLOOK.EXE", "");
    }

    Your browse will prompt you to run the file...
     
  • Comment #3 (Posted by arif - arif2net at yahoo.com)
    Rating
    Using FScommand in flash, you can launch external applications. Things to note are -

    1. You can only do this from a projector (exe made using publish), not a SWF.

    2. The external executable file has to be in a subfolder named "fscommand" in the same folder as your projector file (this is for some security reasons).

    3. Using this you can only launch an EXE or a BAT file.
    4. Flash MX does not let you pass any parameters to the external executable. If you want to work in flash 5, this link will be of particular interest to you http://flashtools.net/.

    Now, if you want to launch anything like an Excel or Word document or any other document like a PDF or maybe even a PowerPoint presentation, you this tool by flashgeek.com.

    This is the code that will go on any button in your flash projector file.

    on (release) {
    fscommand ("exec", "flashgeek.exe");
    }

    Now flashgeek.exe goes in the fscommand folder along with the text file "flashgeek.txt". You have to specify the path and file name of the object you would like to open in flashgeek.txt (the path can be relative or hardcoded).

    Please note

    1. Name the executable and the text file the same name (like flashgeek.exe and flashgeek.txt).
    2. For each document that you want to open, you'll have to have a set of the exe and text file like flashgeek1.exe and flashgeek1.txt and so on.

    You can also check freemx. It is a similar tool with advanced features like detecting flash plug-in etc.

    http://www.programmingtalk.com/archive/index.php/t-32357.html
     
Submit Comment



Search Entire Site
Add to Google
Advertisements
Article Options
Latest New Articles
Set up a simple IIS Server for Flash
by Peter McBride

Day 1 at FITC Toronto 2008
by Anthony Pace

Simple reflection effect with AS2
by Jean André Mas

ActionScript.org Meets Josh Tynjala (aka dr_zeus)
by ActionScript.org Staff

Rapidly Create Online Flash Movies to Help Users Market, Sell and Support Software and Hardware
by Sabrina F

mailing list
Enter your email address:
mailing list
Subscribe Unsubscribe
© 2000-2007 actionscript.org! All Rights Reserved.
Read our Privacy Statement and Terms of Use...
Our dedicated server is hosted and managed by WebScorpion Webhosting.