The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 12 of 12

Thread: open an external file with AS3

  1. #1

    open an external file with AS3

    Hi All....does anyone know how to open an external file on your hard drive from your swf and .EXE using AS3? I wana click on a button and basically just open a PDF

    Searched high and low and even liveDOCS hasnt got an answer.

    Thanks a million


  2. #2
    open it as a URL

    navigateToURL()
    current project: a2om world
    critique thread; please post your comments

  3. #3
    Might want to check out AIR development.. http://agknology.com/blog/http:/agkn...om/blog/air/29

    there are also 3rd party "swftoexe wrappers" such as swfkit or zinc you could look into..

  4. #4
    Quote Originally Posted by devonair View Post
    Might want to check out AIR development.. http://agknology.com/blog/http:/agkn...om/blog/air/29

    there are also 3rd party "swftoexe wrappers" such as swfkit or zinc you could look into..
    i dont think air can execute shell commands ?

    zinc is amazing! If air could do everything Zinc could we would be laughing

    if your app is an offline app zinc will do it.
    current project: a2om world
    critique thread; please post your comments

  5. #5
    Thanks for the help...managed to do this and it works like a charm:

    import flash.net.navigateToURL;
    import flash.net.URLRequest;


    myButton.addEventListener(MouseEvent.CLICK, goPDF);

    function goPDF(event:MouseEvent):void {
    var url:String = "UserGuide/USER-GUIDE.pdf";
    var request:URLRequest = new URLRequest(url);
    navigateToURL(request);
    }

  6. #6
    i dont think air can execute shell commands ?
    it can't, but if you check out that link, it basically uses an HTML object instance to display the .pdf

    zinc is amazing! If air could do everything Zinc could we would be laughing

    if your app is an offline app zinc will do it.
    Personally, I found zinc to be horrible. It's buggy (if your registered at their forum, check out this thread: http://www.mdmforum.com/forum/index.php?showtopic=13837) and AS3 support is horrible.. SWFKit is my fave if AIR won't do the trick..

  7. #7
    Quote Originally Posted by devonair View Post
    it can't, but if you check out that link, it basically uses an HTML object instance to display the .pdf



    Personally, I found zinc to be horrible. It's buggy (if your registered at their forum, check out this thread: http://www.mdmforum.com/forum/index.php?showtopic=13837) and AS3 support is horrible.. SWFKit is my fave if AIR won't do the trick..
    indeed, i had to learn flex becuase zinc didnt use AS3, dunno if they fixed that yet

    to be honest, i totally forgot about that
    i did however use it in flex with AS3 for a project. Go figure. Just doesnt with Flash.

    it has gotten me out of a lot of tricky situations however
    current project: a2om world
    critique thread; please post your comments

  8. #8
    2
    posts
    Registered User
    Hi everyone!
    I just googled and found this thread which I need very bad!
    I'm building a standalone EXE application, and I need to open some files just like the user TRixation wanted exept I want to open another Flash EXE or SWF. I've used a code you've provided, but when I use it in application, an internet browser is opening wanting to download or open that URL. That's annoying and I want to ask is there any chance to avoid this? Just to open raw EXE, SWF files instant?

    Thank you in advance! Cheers!
    Last edited by IvaK; July 4th, 2010 at 05:03 AM.

  9. #9
    2
    posts
    Registered User
    Sorry for double posting, but can anyone please respond?

  10. #10
    Anyone got a solution to this?

    Need to open an exe without using navigateToURL.

    Would prefer not to use 3rd-party wrappers...

  11. #11
    this post has the answer for you, scroll down to the end.

    http://www.kirupa.com/forum/showthread.php?t=356089

  12. #12
    Thank you for the reply.

    So the short answer is that you can't do it without a 3rd-party wrapper.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012