Regarding File handling in flex

Hi,
How can I select a image file from local disk of mobile for a player in a game.
I am creating a game where I have to create players for game.So I am trying to get image form local disk of mobile for each players.
Is this possible?
thanks in advance,
Any help will be appreciated,

You would use the FileReference class for this. Some devices (I think just iOS) may have restrictions on what files you can access through this.

Similar Messages

  • Wish list regarding file handling

    A great start for a PL/SQL editor, after using it a bit, I have a couple suggestion which would make it better for my work environment
    1) Ability to save a package header and body in two separate files, with the same name, but different extension (.pks & .pkb)
    2) Integration with source control, namely clear case, as all my PL/SQL has to be under version control, which in my company's case is ClearCase.
    3) Building a plugin documentation, which I understand cannot be released until after a final product is released, and code is frozen.

    A great start for a PL/SQL editor, after using it a
    bit, I have a couple suggestion which would make it
    better for my work environment
    1) Ability to save a package header and body in two
    separate files, with the same name, but different
    extension (.pks & .pkb)
    I would like this to. For compatibility with my back catalog of cvs pl/sql archives the ability to have user-defined extension names for all ddl and source types would be useful.
    For example for PL/SQL code I use .prc .fun .pkg and .pkg.

  • Help needed regarding file handling

    I have a file path.txt which contains the path of 10 other files....I am attempting to send path.txt through command line arguement and then read each line at a time from the file. Now each line in the file is a path to another file. I have used a string to store each line and am calling a function func() where I am sending the string. Now using that string which contains the path of another file say 1.txt i am trying to open 1.txt .......I have given my prog below....sending path.txt is working fine but reading a path from path.txt and opening that particular file is not happening
    if possible kindly correct my program or give any other prog to do this problem
    import java.io.*;
    class Prog {
         int size;
         static void func(String str1)               throws IOException
              int i;
              int cnt=-1;
              FileInputStream fin;
              try {
                   fin = new FileInputStream(str1);
              catch(FileNotFoundException exc)
                   System.out.println(exc);
                   return;
              catch(ArrayIndexOutOfBoundsException exc)
                   System.out.println("Usage: Showfile file");
                   return;
              do{
                   i=fin.read();
                   cnt++;
              }while(i!=-1);
              System.out.println("File size="+cnt);
              fin.close();
         public static void main(String args[]) throws IOException
              int i;
              int cnt=-1;
              String str1="",str="";
              FileInputStream fin;
              for(i=0;i<args.length;i++)
                   str+=args;
                   str+=" ";
              str=str.substring(0,str.length()-1);
              try {
                   fin = new FileInputStream(str);
              catch(FileNotFoundException exc)
                   System.out.println("File not found");
                   return;
              catch(ArrayIndexOutOfBoundsException exc)
                   System.out.println("Usage: Showfile file");
                   return;
              i=0;
              while(true){
                   i=fin.read();
                   if(i==-1)
                        break;
                   cnt++;
                   if((char) i!='\n')
                             str1=str1+(char)i;
                   else
                        func(str1);
                        str1="";
              System.out.println("File size="+cnt);
              fin.close();

    just putting it in code blocks
    import java.io.*;
    class Prog {
    int size;
    static void func(String str1) throws IOException
    int i;
    int cnt=-1;
    FileInputStream fin;
    try {
    fin = new FileInputStream(str1);
    catch(FileNotFoundException exc)
    System.out.println(exc);
    return;
    catch(ArrayIndexOutOfBoundsException exc)
    System.out.println("Usage: Showfile file");
    return;
    do{
    i=fin.read();
    cnt++;
    }while(i!=-1);
    System.out.println("File size="+cnt);
    fin.close();
    public static void main(String args[]) throws IOException
    int i;
    int cnt=-1;
    String str1="",str="";
    FileInputStream fin;
    for(i=0;i<args.length;i++)
    str+=args;
    str+=" ";
    str=str.substring(0,str.length()-1);
    try {
    fin = new FileInputStream(str);
    catch(FileNotFoundException exc)
    System.out.println("File not found");
    return;
    catch(ArrayIndexOutOfBoundsException exc)
    System.out.println("Usage: Showfile file");
    return;
    i=0;
    while(true){
    i=fin.read();
    if(i==-1)
    break;
    cnt++;
    if((char) i!='\n')
    str1=str1+(char)i;
    else
    func(str1);
    str1="";
    System.out.println("File size="+cnt);
    fin.close();
    }

  • Dupliacte File handling

    Dear All
    I have a querry regarding file handling capabilities at XI ....
    files are coming to FTP Server  XI Picks the file from a FTP server and process to post at R/3
    & file is archives at another folder at FTP server .... some peple at diffrent center post the file again at FTP .....
    is there any way at XI , so that XI did not pick the same file /duplicate file again .....
    how can i achieve this
    Thanks
    Priya

    Hi
    No standard way exists at XI
    look at this pdf
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2dd39dceaa0
    refer this wiki https://wiki.sdn.sap.com/wiki/x/AoFwAg
    refer this Blog/people/sandeep.jaiswal/blog/2008/05/13/adapter-module-to-stop-processing-of-duplicate-file-ftp-location
    duplicate File name check
    Regards
    Abhishek

  • How can i Upload Files from my Flex 2.0 Application?

    How can i do a Upload File funtionality with Flex 2.0? Do i
    have to make the component? How is the code in Flex/ Action Script
    to make this possible?. I'm new in this Flex world and it seems to
    me very interesting to make RIA's Applications; in fact i'm making
    a little Employees Application for my company and i'm trying this
    technology and of course i need the functionality that i asking
    for.
    Regards.
    Andres.

    I haven't tried this, but I believe what you could do is
    append
    requestHeaders to the urlrequest object that you pass into
    the file.upload()
    method. The requestHeaders is an array of name/value pairs
    that would be
    included with your post. At least in theory, I believe that
    shoudl work.
    Good luck.
    Phil
    "tantalo" <[email protected]> wrote in
    message
    news:e3q3mt$138$[email protected]..
    > Hi. Phil, how i commented in the forum the examples
    works ok, with a
    > little
    > changes to make a file Upload. Now i have another doubt,
    i need to make a
    > submit of a form with another fields and the file
    selected.
    >
    > I made a HHTP Service for that purpose with the tags
    Requests like:
    >
    > <mx:HTTPService id="empleadoRequest"
    > url="
    http://andresbarrios:8080/directorio/empleados/insertarEmpleado.jsp"
    > useProxy="false" method="POST">
    > <mx:request xmlns="">
    >
    <empresa>{empresa.selectedItem.data}</empresa>
    >
    <ubicacion>{ubicacion.selectedItem.data}</ubicacion>
    >
    <departamento>{departamento.selectedItem.data}</departamento>
    > <cedula>{cedula.text}</cedula>
    > <nombre>{nombre.text}</nombre>
    > <apellido>{apellido.text}</apellido>
    > <!--Falta Fecha de Nacimiento -->
    > <sexo>{sexo.selectedItem.data}</sexo>
    >
    <estado_civil>{estado_civil.selectedItem.data}</estado_civil>
    >
    <telefono_celular>{telefono_celular.text}</telefono_celular>
    > <extension>{extension.text}</extension>
    >
    <correo_electronico>{correo_electronico.text}</correo_electronico>
    > </mx:request>
    > </mx:HTTPService>
    > I have the global variable called "file" that contains
    the file selected.
    > I
    > want to send this file variable in the HHTPservice call
    EmpleadoRequest,
    > can i
    > do that with a Request tag like another field? or the
    only way is trougth:
    > file.upload(upload.cfm) ?;
    >
    > I want only make a one call to the server to submit the
    fields of the form
    > and
    > to upload the file at th e same time can you help me How
    can i do that?
    >
    > Thanks.
    >
    > Regards.
    >
    > Andres.
    >
    >
    >

  • Empty File Handling in xLink adapter

    Helloo Experts
    I am doing a scenario, which creates an empty file(when some mapping condition doesnt satisfy).
    I dont want to write this empty file in the target directory.
    This can be handled if a file adapter is used, but I am using a SOAP AXIS adapter, so I dont know how to handle this here.
    I alaso tried using the StrictXml2PlainBean to avoid the creation, it creates 0 documents and a 0kb empty file.
    Can anyone please let me know how this can be solved????
    Also if some one has done this empty file handling in J2SE file adapter...can you tell how it was done.
    Thanks a lot!!!!!!
    Regards
    Shobha

    Hi Gabriel,
                       You can write a simple script to copy a file from source folder to target in case the fiel size is ZERO bytes. The script will not copy the file if the filesize is more than zero bytes, This will be processed normally by PI server. You can call the script from sender communication channel parameter : "RUN OS command before message processing". Could you please specify the Operating System (OS) you are using in your PI server.
    Regards
    Anupam

  • ***Empty File handling,sender .txt file

    Hi All,
    Can we use the option Empty file Handle if the sender is a text file.
    if so how to achieve this.
    Thanks,
    Srinivasa

    Hi,
    Refer the section of 'Empty File Handling' from the below link:
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    You will get the required result.
    Regards,
    Supriya.

  • Empty File Handling : Do Not Create Message

    Hi,
    I have set this option in Sender CC - file.
    Parameters --> Processing.
    I dont want to pass file to reciever , when file is empty.
    Will the above option  "Do Not Create Message" do the trick.
    OR do i need to choose something else??
    -santosh.

    Santosh,
    Yes. The trick will work for empty file handling.
    When your incoming file is empty then will be no xml message posted to IE and hence receiver will not get any message.
    FYI: Also you can use skip empty files which will do the same but here the files will remain in your source directory.
    Regards,
    Prasanthi.

  • Duplicate File Handling Issues - Sender File Adapter - SAP PO 7.31 - Single Stack

    Hi All,
    We have a requirement to avoid processing of duplicate files. Our system is PI 7.31 Enh. Pack 1 SP 23. I tried using the 'Duplicate File Handling' feature in Sender File Adapter but things are not working out as expected. I processed same file again and again and PO is creating successful messages everytime rather than generating alerts/warnings or deactivating the channel.
    I went through the link  Michal's PI tips: Duplicate handling in file adapter - 7.31  . I have maintained similar setting but unable to get the functionality achieved. Is there anything I am missing or any setting that is required apart from the Duplicate file handling check box and a threshold count??
    Any help will be highly appreciated.
    Thanks,
    Abhishek

    Hello Sarvjeet,
    I'd to write a UDF in message mapping to identify duplicate files and throw an exception. In my case, I had to compare with the file load directory (source directory) with the archive directory to identify whether the new file is a duplicate or not. I'm not sure if this is the same case with you. See if below helps: (I used parameterized mapping to input the file locations in integration directory rather than hard-coding it in the mapping)
    AbstractTrace trace;
        trace = container.getTrace();
        double archiveFileSize = 0;
        double newFileSizeDouble = Double.parseDouble(newFileSize);
        String archiveFile = "";
        String archiveFileTrimmed = "";
        int var2 = 0;
        File directory = new File(directoryName);
        File[] fList = directory.listFiles();
        Arrays.sort(fList, Collections.reverseOrder());
        // Traversing through all the files
        for (File file : fList){   
            // If the directory element is a file
            if (file.isFile()){       
                            trace.addInfo("Filename: " + file.getName()+ ":: Archive File Time: "+ Long.toString(file.lastModified()));
                            archiveFile = file.getName();
                          archiveFileTrimmed = archiveFile.substring(20);       
                          archiveFileSize = file.length();
                            if (archiveFileTrimmed.equals(newFile) && archiveFileSize == newFileSizeDouble ) {
                                    var2 = var2 + 1;
                                    trace.addInfo("Duplicate File Found."+newFile);
                                    if (var2 == 2) {
                                            break;
                            else {
                                    continue;
        if (var2 == 2) {
            var2 = 0;
            throw new StreamTransformationException("Duplicate File Found. Processing for the current file is stopped. File: "+newFile+", File Size: "+newFileSize);
    return Integer.toString(var2);
    Regards,
    Abhishek

  • HOW: File handling - Date and time of file created/modified

    Hi all,
    Is there any way by which we can find out the date and time of the file created in operating system using file handling through PL/SQL.
    Eg:-
    I have a directory in which I am storing some files, and for a given file name I must know when that file was created, i mean date and time.
    Might be there is some simple way, please help out.
    regards
    CJ

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584#73995149457661
    Remember to get the correct privs (java privs) on the directory.
    Mette

  • NFS: server reboot - client problem with "file handle" - no unmont

    Hello,
    when I restart a NFS-server and a client has a NFS-share on it still mounted, that NFS-share becomes unusable on the client: everything causes the client complain about an old "file handle", even trying to unmount that share!
    So my question is: How to deal gracefully with a NFS-server reboot and avoiding this file handle problem?
    Apart from going to each client and unmount the NFS-share by hand?
    Thanks!

    Do I need to Give these values manually again as they are moved from Env to other?
    When we transport ID objects, the values stored in the channel get lost and have to be manually enetered......it happens even for DEV --> QA environment.
    Now your channel should reflect PROD-related data.
    2- Why my Receiver communiation channel coimg as
    Communication Channel | PRD_400 | RFC_QA3_Receiver:
    The channel name does not depend on the environment it is present....verify the name once again!
    Regards,
    Abhishek.

  • Agent Unreachable, collection status: file handles exhausted

    Hi, I have a problem with management agent. Status of agent in grid control is Agent Unreachable. Here is an output of emctl status agent:
    Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
    Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
    Agent Version : 10.2.0.5.0
    OMS Version : 10.2.0.5.0
    Protocol Version : 10.2.0.5.0
    Agent Home : /opt/oracle/agent10g
    Agent binaries : /opt/oracle/agent10g
    Agent Process ID : 26832
    Parent Process ID : 26821
    Agent URL : https://bs11.xxxx.lan:3873/emd/main/
    Repository URL : https://gridcontrol.xxxx.lan:1159/em/upload
    Started at : 2010-07-06 14:24:30
    Started by user : oracle
    Last Reload : 2010-07-06 14:31:50
    Last successful upload : 2010-07-06 15:11:47
    Total Megabytes of XML files uploaded so far : 51.87
    Number of XML files pending upload : 4
    Size of XML files pending upload(MB) : 0.01
    Available disk space on upload filesystem : 60.35%
    Collection Status                            : File handles exhausted
    Last successful heartbeat to OMS : 2010-07-06 15:11:52
    I wonder what does this message mean Collection Status                            : File handles exhausted I can't find any solution to my problem, I tried restarting agent, clearstate, upload, resynchronization... all of this did nothing.

    Did you already check: Master Note for 10g Enterprise Manager Grid Control Agent Performance & Core Dump issues [ID 1087997.1]
    On http://support.oracle.com
    https://support.oracle.com/CSP/ui/flash.html#tab=KBHome%28page=KBHome&id=%28%29%29,%28page=KBNavigator&id=%28bmDocTitle=Master%20Note%20for%2010g%20Enterprise%20Manager%20Grid%20Control%20Agent%20Performance%20&%20Core%20Dump%20issues&bmDocDsrc=KB&bmDocType=BULLETIN&bmDocID=1087997.1&viewingMode=1143&from=BOOKMARK%29%29
    Regards
    Rob
    http://oemgc.wordpress.com

  • Using File handling in JSP

    hi, I am working on website where i have to use file handling instead of database.i m using JSP,the job is,site's contact us page's information should store in a file (.txt) and as a administrator login then this file retrievs details of all the contact us forms information to a new page which directly open as administrator login.
    i am facing problem doing this please help how can i do this.its urgent.

    hi Shalini,
    Regadring upload please follow the link given below
    http://www.jguru.com/faq/view.jsp?EID=160
    Regarding reading the xl sheet, that you can do using this way
    try {
            BufferedReader in = new BufferedReader(new FileReader("xl sheet name.xsl"));
            String str;
            while ((str = in.readLine()) != null) {
                process(str);// what ever u want to with the line
            in.close();
        } catch (IOException e) {
        }See its alway easy to read data and print them in row/col
    format if it contains a delimiter(like * or , or |) after
    every column data. U can use StringTokenizer for separating
    out each column data.
    Just try this and see whether u r able to read or not.
    regards
    Goodieguy

  • Error handling message: flex.messaging.MessageException: No destination with id '' is registered with any service

    Hi,
    We are using both Remoting and HttpService calls for our business application.
    We were able to communicate with the LCDS server till this point with whatever default settings provided for AMFChannel configuration in services-config.xml through a flex client. Also we have a clustered environment for this servers which works out fine till now.
    Now for performance enhancement improvements, we started using Caching Mechanism for our HttpService urls (through some third party service), which will now be cached on the network instead of accessing every time from our clustered servers. But all our AMF calls through Remoting services are still the same.
    So after migrating to this Caching environment, we started encountering intermittent issues where some of our AMF calls were failing with falling exception trace :
    16:03:40,576 INFO [STDOUT] [Flex] [ERROR] Error handling message: flex.messaging.MessageException: No destination with id '' is registered with any service.
    incomingMessage: Flex Message (flex.messaging.messages.CommandMessage)
    operation = invalid.12
    clientId = D7855C44-810B-64AB-C176-7C38F83DEB2C
    correlationId =
    destination =
    messageId = 2DA6BDB8-859E-8AE1-03A4-57743DE03188
    timestamp = 1247007820561
    timeToLive = 0
    body = {}
    hdr(DSId) = D77C6BD2-3808-1512-3984-CCF397428E35
    hdr(DSEndpoint) = my-amf
    errorReply: Flex Message (flex.messaging.messages.ErrorMessage)
    clientId = D7855C44-810B-64AB-C176-7C38F83DEB2C
    correlationId = 2DA6BDB8-859E-8AE1-03A4-57743DE03188
    destination =
    messageId = D7855C64-3E08-466B-96F8-5BAE7D385129
    timestamp = 1247007820574
    timeToLive = 0
    body = null
    code = Server.Processing
    message = No destination with id '' is registered with any service.
    details = null
    rootCause = null
    body = null
    extendedData = null
    So i do not understand, most of the times the AMF calls works correctly and some times it fails with above fail trace.
    Any suggestions would be appreciated.
    Thanks,
    FlexPirate

    It might be a bit late but replying for anyone who lands on this page facing this same problem.
    The solution for "No destination with id '<my dest id>' is registered with any service" problem is that you have to make sure your destination definition is added in your:
    C:\ColdFusion9\wwwroot\WEB-INF\flex\messaging-config.xml
    Secondly, If you are deploying it on a ColdFusion Server, then you have to make sure exact same definition is added in Server messaging-config.xml file as well.
    This should solve this problem.
    While we are at it, wanted to point another possible gotcha.
    if your Server is using SSL protocol i.e. it has https:// rather than http://, Then within your <destination> definition block in messaging-config.xml, you have to add appropriate secure channels in <channels> section. You can find all available channel definitions in
    C:\ColdFusion9\wwwroot\WEB-INF\flex\services-config.xml

  • Global Error Handling in Flex

    Hello All,
    I want to know if there is away to do Global Error Handling in Flex so that in case of any error, the pop-up (showing the exception stack trace) on the client machine should not come, instead I would be able to handle the exception in a more subtle manner.
    Can I do something at the application level to prevent this ??  or should it be handled in each Flex method individually, code enclosed between try-catch blocks ?
    Thanks & Regards,
    Agraj

    Hi,
    Try referring the below links...
    http://www.summa-tech.com/blog/2010/01/04/global-error-handling-in-flex/
    http://livedocs.adobe.com/flex/3/html/help.html?content=11_Handling_errors_06.html
    You have one sample demo with source in first link.
    Hope this will be helpful.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

Maybe you are looking for

  • How to Track the changes made to the custom table field value

    I want to track the changes made to the custom table field value in table maintenance generator.please help me it is very urgent Thanks & Regards, Kranti

  • Get messagewhen syncing iphone no longer connected or not responding

    I have tried to transfer ringtones from my computer or memory stick to my iphone. These ringtones were previously on this phone but are gone. Each time I try to sync them again, I get the message "your iphone is no longer connected or is not respondi

  • Reg:Grouping Key

    Hi How to pay single check to multiple vendors

  • Parcel tracking  - cheating XSI

    Hi, I was wondering if there's a way to use parcel tracking functionality without actually connecting to the express delivery company. I went through all the posts found on this site as well as SAP manual for setting up XSI and parcel tracking. I've

  • Lost settings (wrench) icon from my blackberry 8110

    Don't know how I did it, I think I deleted it, but there is no settings icon anymore on the screen. I try with menu option - Show all, but no luck. Could you please help with restoring it? How to get it back? How to reset phone without it? Thank you.