A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: how to link external files (.doc, .pdf, .jpeg, .mov) in Adobe action script 2.0

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    1

    Question how to link external files (.doc, .pdf, .jpeg, .mov) in Adobe action script 2.0

    Task: I want to make an interactive DVD which will have a home page and 5 buttons to load 5 different files stored in the same DVD. The file formats are .doc, .pdf, .jpeg, .mov, .html

    Plan: I want to do it in Adobe Flash Actionscript 2

    Have done: I have designed the home page layout and buttons in Adobe Flash Actionscript 2.

    Assistance required: I am having problem to link the external files (that is, .doc, .pdf, .jpeg, .mov) which i kept in the same directory with the flash file. I could activate the button to open URL only.

    It would be a great help if you help me to solve this problem. Pls note that i am a beginner of flash.

    Thanks in advance.

    Nree

  2. #2
    Member
    Join Date
    Aug 2008
    Posts
    33
    use getURL("file address"); for your buttons, I guess it helps you

  3. #3
    Member
    Join Date
    Jul 2008
    Location
    Čakovec, Croatia
    Posts
    34

    better solution

    I also had the same problem and function getURL() wasn't suitable for me because it launches the called document with a browser.

    I found much better solution on the net which can either call the document with its original application (meaning .doc file with MS Office, .pdf with Acrobat Reader etc.) or call the directory in which you store the documents you want to launch.

    The solution is a combination of a proxy.exe file (which I've downloaded from the net) and a .bat file which you create on your own (with Notepad - just add .bat extension).

    PROCEDURE DESCRIPTION

    1. Create a .fla document with links (I will describe how to do so later on) and publish it as a projector file

    2. Create a "fscommand" directory as a sub-directory inside the directory of your projector file (with links)



    I. Opening a file with its original application
    --> say you want to open the "something.doc" file --> copy that file inside the fscommand directory
    --> in the fscommand directory create a file "something.bat" with the next line start something.doc
    --> copy "proxy.exe" file also inside fscommand directory and rename it to something (meaning something.exe)

    How to create a link button?
    --> in your projector file create a button and add next code to it: on(release) {fscommand("exec", "something.exe")}



    II. Opening a directory
    --> say you want to open some file which is inside a particular directory
    --> create a new directory (for example "Docs") inside the directory of your projector file (and fscommand directory)
    --> in the fscommand directory create a file "Docs.bat" with the next line start ..\Docs
    --> copy "proxy.exe" file also inside fscommand directory and rename it to Docs (meaning Docs.exe)

    How to create a link button?
    --> in your projector file create a button and add next code to it: on(release) {fscommand("exec", "Docs.exe")}


    Final note
    You can do the whole procedure without creating a .bat file - its only purpose is to prevent showing a DOS Command Prompt (black screen).

    Hope this helped you

    Alex

    P.S. I've attached a proxy.exe which is called "Geofunkcije.exe" (don't have the original proxy.exe any more, but have this one - you just rename it according to your files' names)

    <ADMIN: Download removed. Was flagged as bad file by search engines>
    Last edited by brad jones; 10-09-2015 at 03:26 PM. Reason: removed attachment

  4. #4
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You can find the original proxy.exe on my blog, along with instructions explaining how to use it.
    http://www.northcode.com/blog.php/20...C-Part-1-Proxy
    When your swf2exe tool just HAS to work
    there's only one choice... SWF Studio

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