How to open a folder using Actionscript 3.0

Hi,
I have been trying for about a day to get this to work, but nothing seems to, so i'm finally going to ask.
So far, code wise, i have this:
     open_btn.addEventListener(MouseEvent.CLICK, OpenButtonHandler);
     function OpenButtonHandler(event:MouseEvent):void
From there, what code gets flash to literally open up a folder such as My Documents? The end use of this code will be for a CD, whereby the flash .exe file will call up folders from the disc through clicking buttons. Also, please make me awear of under what situations the code may not work. At the moment, i am writting the .exe file to the desktop, and trying to open a folder on my desktop through the application.
Often times, everything i have tried so far, either causes Syntax Errors or no errors, but just doesn't work.
Thanks,
Ricky
EDIT:
Primarily in Windows, but if you know the Mac way too, that could be useful.

Is there no way to get buttons to open up explorer folders specified? It seems people are managing it somehow, but i can't do it. Others aprantly can do it using this code:
     on(release){
      getURL("flash",_black);
, but that's actionscript 2, not 3 which i am using. Surely actionscript 3 can do this and possibly even better seeing as it is a higher version?
I also found another bit of code that was like this:
     fscommand("exec","explorer\dirname");
,but again that didnt work. However, in another way it did because flash reported no errors when it was run, but nothing happened when the button was clicked.
The only other thing i tried was this:
     var request:URLRequest=new URLRequest("C:\\");
    navigateToURL(request);
The problem with that was that it tried to open the internet as expected unfortinatly, not windows explorer to open the folder C:\\.
Directing users to the appropiate locations on the disk wasn't really what i needed thanks for the suggestion though.
EDIT:
That last idea worked, sorry, but it opened in the default web-browser instead of using explorer, so i'm half way there. Is it possible to tell it what application to use to open the directory, so that way i can specify explorer?

Similar Messages

  • How To Open A Folder of native system

    Hello Frnds can any body guides me how to open a folder of my system.actually i am using adobe air 2.0 for making a simple application in which i send and recived files.I simply uses File Class for extarct the nativepath of file.now i have path where my downloaded file stored.so Please tell me how to open the file or File Containg folder similary sevral aother web application does.
    Thanks In Advance
        Vineet Osho

    For opening the file itself, AIR 2.0 gives you a method in the File class called File.openWithDefaultApplication():
    openWithDefaultApplication
    method
    public function openWithDefaultApplication():void
    Language Version:
    ActionScript 3.0
    Runtime Versions:
    AIR 2
    Opens the file in the application registered by the operating system to open this file type
    The method description goes onto to talk about restrictions on file types in different operating systems.
    As far as opening a directory and performing some action on its contents, you can use the method File.getDirectoryListing(). This returns an array of File objects. You can test each File object with the isDirectory property, if you are interested in finding and dealing with sub-directories.
    Bill

  • I do not know how to open a folder, file !

    Hi  everyone,
    I do not know how to open a folder, file or
    a JavaScript  program in photoshop cs4?
    can you tell me how to proceed
    Thank you

    thank zhpingw
    the script not function unfortunately
    I had to go  through to have a flash file. swf
    I put in a  url link
    file. swf I was put in the palette and  its works!
    Download This file tutoweb. link . swf
    requete  content  for Google find tuto a Photoshop !
    Warning you change to script Google.fr  for Google.uk  in file .fla
    Place to swf in your palet of configurator
    Enjoy
    http://rapidshare.com/files/390041665/Flash_CS4.rar

  • How to open/read file using Java in Unix?

    Hi Friends,
    Can you please help me out how to open/read file using java in unix os? I have create one text file in "/home/test.txt" in unix environment. How to open the same file & read using java code?
    - Hiren Modi

    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How to open multi tasking using gesture in iphone 5s 7.0.6(11B651)

    How to open multi tasking using gesture in iphone 5s 7.0.6(11B651), i m able to open only by double press of centre button or using accessilbity multi tasking option.
    is it possible to open like ipad using a five finger upward gesture?

    is it possible to open like ipad using a five finger upward gesture?
    No. The "double click" method is the only way.
    iOS: Understanding multitasking - Support - Apple

  • I have downloaded an app from the Istore and now I can't figure out how to open it or use it

    I have downloaded an app to use on my laptop and now I can't figure out how to open it and use it.  It shows it in the download area..........any suggestions would be great.

    Have you looked in your menu of programs (in Windows:  Start -> All Programs -> etc....)?

  • Urgent... how to open particular folder by using file tag

    Hi,
    I want to select a particular folder using file browsing option in html. why i want this is : i have to update the resumes located in a particular folder. so every time i am opening that folder which is a subfolder.
    ex: c:\dir1\dir2\dir3\Resumes
    Eveevry time , i have to go to C -> dir1->dir2-->dir3 then Reusmes
    what i need is when i click the browsing button, i want to get the Resumes folder directly. Is there any option to do that one by setting value to file tag.
    thanks in advance
    my mail id [email protected]

    Hi venkatanarayanareddy (if that is your real name),
    You say you want to use file browsing option in html, which makes me guess this functionality is through a web page. Can you give us a bit more information about how this works as it's not abundantly clear how it relates to Java (JSP?).
    On another note (and I woke in customarily pedantic mood this morning), there's no need to post your e-mail address since [in the name of sharing the knowledge and not keeping answers to questions secret between the questioner and respondant] you will find responses posted here in the forum.
    Chris.

  • Urgent.. How to open Particular folder direcly using File Browse tag

    Hi,
    I want to select a particular folder using file browsing option in html. why i want this is : i have to update the resumes located in a particular folder. so every time i am opening that folder which is a subfolder.
    ex: c:\dir1\dir2\dir3\Resumes
    Eveevry time , i have to go to C -> dir1->dir2-->dir3 then Reusmes
    what i need is when i click the browsing button, i want to get the Resumes folder directly. Is there any option to do that one by setting value to file tag.
    thanks in advance

    Hi venkatanarayanareddy (if that is your real name),
    You say you want to use file browsing option in html, which makes me guess this functionality is through a web page. Can you give us a bit more information about how this works as it's not abundantly clear how it relates to Java (JSP?).
    On another note (and I woke in customarily pedantic mood this morning), there's no need to post your e-mail address since [in the name of sharing the knowledge and not keeping answers to questions secret between the questioner and respondant] you will find responses posted here in the forum.
    Chris.

  • How to relink media programatically using actionscript or from extendscript?

    Hi,
         Can somebody suggest a way to relink the media files in a premiere pro CC project files to another media location programatically?
         In CC project files we cannot edit anything right?
         So if we need to change the Project File items path what should we do other than manually relinking each file?
    Please Suggest, Thanks you,
    Anoop NR

    Is there no way to get buttons to open up explorer folders specified? It seems people are managing it somehow, but i can't do it. Others aprantly can do it using this code:
         on(release){
          getURL("flash",_black);
    , but that's actionscript 2, not 3 which i am using. Surely actionscript 3 can do this and possibly even better seeing as it is a higher version?
    I also found another bit of code that was like this:
         fscommand("exec","explorer\dirname");
    ,but again that didnt work. However, in another way it did because flash reported no errors when it was run, but nothing happened when the button was clicked.
    The only other thing i tried was this:
         var request:URLRequest=new URLRequest("C:\\");
        navigateToURL(request);
    The problem with that was that it tried to open the internet as expected unfortinatly, not windows explorer to open the folder C:\\.
    Directing users to the appropiate locations on the disk wasn't really what i needed thanks for the suggestion though.
    EDIT:
    That last idea worked, sorry, but it opened in the default web-browser instead of using explorer, so i'm half way there. Is it possible to tell it what application to use to open the directory, so that way i can specify explorer?

  • How to open a folder in Terminal

    Folks
    Sorry, but I'm 'way out of my depth dealing with unix, but I know it's mighty interesting, and I just wish I had time to learn it, but...! Here's my need:
    My Trash is so full it won't open just by mouse click! I need to check it before I Empty Trash. What is the command/string I need to open the folder, please?
    Anybody help me, please?
    Regards
    Roy

    You can actually, should you desire a more GUI experience, drag-and-drop a folder onto Terminal.app, which will accomplish the same task as Unix's cd.
    That is not correct.
    Dragging a folder to a terminal window is in no way related to cd.
    All that happens is that the path to that folder is written out, as if you'd typed it.
    This does not cd to that directory, it doesn't even imply you will cd to that directory after pressing return (unless you manually typed cd before you dragged the folder to the terminal, but the cd is entirely up to you - you might prefer to ls or even rmdir that directory, which are just as valid uses for the drag-and-drop).

  • How to upload JPEG files using ActionScript 3.0

    Hi all,
    It's very urgent.
    I am new to ActionScript. Presently, I am working on
    ActionScript3.0. I am using flash 9.0 and the code I ned is for
    ActionScript3.0.
    I have a combo-box on the stage with a few items in the
    combo-box and also have corresponding JPEG/PNG image files.
    My goal is :
    I need to display the appropriate image onto the stage based
    on the selection of the item in the combo-box. So, please I need
    ActionScript code or procedure to handle this using
    Event-Handling mechanism of MouseEvent.
    I need help.. Please help me.... I am new to the
    ActionScript and flash environment.
    Thanks a lot in advance.....
    Srihari.Ch

    Hi kglad,
    Once again thanx for your help. I had one more problem for
    which I need a solution.
    As you know,I am new to ActionScript 3.0 and flash.
    Presently, I am using Adobe flash CS3 and working with it using
    ActionScript 3.0.
    I need code (or) procedure for developing an application in
    such a way that, When I click on a button present
    on the stage, I should get execute an HTML file(say,
    Hello.html) which is present in the local hard-disk in the same
    folder as with the flash file.
    I had developed HTML file and flash file.
    I am attaching the JavaScript code which is getting executed
    in flash:
    So, the java-script file is not getting executed .Instead, it
    is displaying a browser with a blankpage. So, I need the
    ActionScript to get executed.
    Please, help me.... It's very urgent....
    Thanks in advance.

  • How to open a file using OAF

    Hi,
    I want to open a file using OAF. I know the path and file name.
    How can I open it, if file is in UNIX or in windows, where ever.
    Is there any way to do that.
    Thanks in Advance!!

    Hi Ankur,
    I had something link this requirement, that also for a concurrent program output only, but the output was txt file, and make it a zip file and give a dynamic link and open it.
    For that i used the following code, may be it will help.
    String zipout = pageContext.getParameter("ZIPOUT");
    if(zipout!=null && zipout.equals("Y"))
    try
    DataObject sessionDictionary = (DataObject) pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse) sessionDictionary.selectValue(null, "HttpServletResponse");
    HttpServletRequest request = (HttpServletRequest) sessionDictionary.selectValue(null, "HttpServletRequest");
    String requestID = pageContext.getParameter("REQUESTID");
    response.setHeader("Content-Disposition","p; filename=CatExtract"+requestID+".zip");
    response.setContentType("application/x-zip-compressed");
    ZipOutputStream zip = new ZipOutputStream(response.getOutputStream());
    try
    byte[] buffer = new byte[1024];
    int bytesRead;
    //to get the value of output directory
    String fileName = "/o"+requestID+".out";
    Serializable[] parameters = { requestID };
    //Get the output URL for this requests output.
    pageContext.getApplicationModule(webBean).invokeMethod("getOutputURL", parameters);
    String outputURL = (String)pageContext.getTransactionValue("OutputURL");
    pageContext.writeDiagnostics(this.getClass().getName(),"outputURL in the xxt CO"+outputURL,1);
    try
    URL fileURL = new URL(outputURL);
    URLConnection urlConn = fileURL.openConnection();
    DataInputStream out = new DataInputStream(urlConn.getInputStream());
    try
    ZipEntry entry = new ZipEntry(fileName);
    zip.putNextEntry(entry);
    while ((bytesRead = out.read(buffer)) != -1)
    zip.write(buffer, 0, bytesRead);
    zip.closeEntry();
    pageContext.writeDiagnostics(entry.getName(), " added.",1);
    catch (Exception ex)
    pageContext.writeDiagnostics(this.getClass().getName(),"Exception 113"+ex,1);
    finally
    out.close();
    catch (IOException ex)
    pageContext.writeDiagnostics(this.getClass().getName(),"Exception 124"+ex,1);
    System.out.println("Exception 124 "+ex);
    Thanks.
    With Regards,
    Kali.

  • How to open a browser using button?

    Hi,experts,
    I create a button in a view in the WDJ.
    I can get a URL through call a webservice when I click the button and I need open a browser using the URL automatically. 
    How can I do it?
    Best regards,
    tao

    Hi Tao,
    You can use the following method of WindowManager in the action assigned to onAction event of your button:
    wdComponentAPI.getWindowManager().createNonModalExternalWindow(String URL,String  title);
    Regards,
    Ajay

  • Open local Folder using Applet Problem

    Deal all,
    This problem is a real torment to me. Why I could run the code by appletviewer. And I could open local folder. But I try to open one webpage including this applet code, I could not run the same function. Please tell me how should I solve it. It is a Applet Security problem? Even I change my web Server java.policy, it is still not workable. How should I verify java.policy when user run applet?
    <<my code>>
    ==========================
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    import java.applet.*;
    public class FileSelectApplet extends Applet{
         Button btn = new Button("Choice");
         File name;
         Label lb = new Label("Please Input File List");
         TextField enter = new TextField("c:\\", 20);
         TextArea output = new TextArea(20, 30);
         public void init() {
              resize(400, 400);
              setLayout(new BorderLayout());
              // Create one Panel with Label/TextField/Button
              Panel pl = new Panel();
              pl.add(lb);
              pl.add(enter);
              btn.addActionListener(new btnListener());
              pl.add(btn);
              add("North", pl);
              add("Center", output);          
         class btnListener implements ActionListener {
              public void actionPerformed(ActionEvent e) {
                   if (e.getActionCommand() == "Choice") {
                        output.setText(enter.getText());
                        name = new File(enter.getText());
                        if (name.exists()) {                         
                             output.append(
                                                 name.getName() + " exists\n" +
                                                 (name.isFile() ? "is a file\n" :
                                                                     "is not a file\n") +
                                                 (name.isDirectory() ? "is a directory\n" :
                                                                               "is not a directory\n") +
                                                 (name.isAbsolute() ? "is absolute path\n" :
                                                                          "is not absolute path\n") +
                                                 "Last modified: " + name.lastModified() +
                                                 "\nLength: " + name.length() +
                                                 "\nPath: " + name.getPath() +
                                                 "\nAbsolute path: " + name.getAbsolutePath() +
                                                 "\nParent: " + name.getParent());
                             if (name.isFile()) {
                                  try {
                                       RandomAccessFile r = new RandomAccessFile(name, "r");
                                       output.append("\n\n");
                                       do {
                                            output.append(r.readLine() + "\n");
                                       } while (r.getFilePointer() < r.length());
                                  catch (IOException ioe) {
                                  } // end of try
                             else if (name.isDirectory()) {
                                  String dir[] = name.list();
                                  output.append("\n\nDirectory contents:\n");
                                  for (int i = 0; i < dir.length; i++)
                                       output.append(dir[i] + "\n");
                             } // end of (name.isFile())                         
                        else {
                                  output.append(enter.getText() + "does not exists\n");
                                  //output.appendText(enter.paramString() + "does not exists\n");
                        } // end of (name.exists())                    
                   } // end of if                    
              } // end of actionPerformed
         } // end of btnListener     
    ==========================

    Yes, that is security problem.
    Apllet can't get access to any local resource.
    To solve that problem you must sign applet or edit "local" policy file.

  • How to open specific port using java program

    Hello,
    I want to open ,close port using java comm.plz help me how can i do it.is it possible
    by using java program.later i want to use that specific port to accept the server socket connection .plz
    help me.

    i try this java program.*but it get block in accept method*.tht mean i m not able to make connection with port.
    import java.sql.SQLException;
    import java.io.IOException;
    import java.net.ServerSocket;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    class MakeConn
         public final static int PORT = 7788;
    public static java.net.Socket clientSocket = null;
    public static java.io.PrintWriter pw = null; // socket output stream
    public static java.io.BufferedReader br = null;
    public static ServerSocket server_socket;
         public static void main(String[] args) throws SQLException
         try {
              server_socket = new ServerSocket(PORT);
    clientSocket = server_socket.accept();
    System.out.println("CLIENT>>>" + clientSocket);
         br = new java.io.BufferedReader(new java.io.InputStreamReader(clientSocket.getInputStream()));
    pw = new java.io.PrintWriter(clientSocket.getOutputStream(), true);
    String message = br.readLine().trim();
    System.out.println("message is"+message);
    pw.close(); // close everything
    br.close();
    clientSocket.close();
         catch (Exception ex) {
    ex.printStackTrace();
    }

Maybe you are looking for

  • Linked image border

    This is small but irritating issue. Ever since upgrading to CS3, whenever I add a link to an image Dreamweaver puts the blue border around it. I have to manually set the border to 0 in the properties to get rid of it. Like I say it's no big thing but

  • "own checkboxes" in Web with Table Interface?????????u00DF

    Hi to all experts, i have the following scenario: I am using a query in web. Well in the lines there is a characteristic (for example sales org) and in the columns a keyfigure with an exception and a top10 condition. I think exception and condition a

  • Java.sql.SQLException: ORA-01461: can bind a LONG value only for insert int

    Hello, I googled a lot but not found the similar problem that I have. I don't have any long column neither in my Java code nor in db as data type but getting the subject error. why? This is my insert code: public String insertIntoCvDetails(String cvI

  • Plz Someone Help me

    I bought a new nokia6700 classic with unlimited internet.My problem is when i browse through diffrent video sites,some of them wants flash player to play specific video.So my question is is there any flash player software  available for NOKIA6700 cla

  • Uprading a 'Not-For-Resale' FB 4.5 license to FB 4.5 for PHP, possible?

    Sorry for cross post, got no replies in the "Installing and activating" forum, so posting here. I have a 'Not-For-Resale' FB 4.5  license. Can I upgrade this to FB 4.5 for PHP? If I purchase a regular  upgrade from FB 4.5 to FB 4.5 for PHP from Adobe