Professional Web Applications Themes

XML Open/Write Error - Macromedia Flash Data Integration

I have an EXE and/or SWF movie that I use to display info from an XML file. The XML file I am using is created and written by a CSharp program every second. Regardless of how often I load the XML via my movie, this error message pops up over the CSharp program, causing it to crash..."The process cannot access the file because it is being used by another process". I load the XML the most common way I think possible... XMLobs = new XML(); XMLobs.ignoreWhite = true; XMLobs.load(XMLFILENAME); XMLobs.onLoad = function () { XMLfile = new XML(); XMLfile = ...

  1. #1

    Default XML Open/Write Error

    I have an EXE and/or SWF movie that I use to display info from an XML file.
    The XML file I am using is created and written by a CSharp program every
    second. Regardless of how often I load the XML via my movie, this error
    message pops up over the CSharp program, causing it to crash..."The process
    cannot access the file because it is being used by another process". I load
    the XML the most common way I think possible...

    XMLobs = new XML();
    XMLobs.ignoreWhite = true;
    XMLobs.load(XMLFILENAME);
    XMLobs.onLoad = function () {
    XMLfile = new XML();
    XMLfile = XMLobs.firstChild.firstChild.nextSibling;
    XMLvars = XMLfile.childNodes;
    for (var i = 0; i < XMLvars.length; i++) {
    if (XMLvars[i].nodeName == "displayname") {
    title = XMLvars[i].firstChild.nodeValue;
    } else if (XMLvars[i].nodeName == "rawstring") {
    udp = XMLvars[i].firstChild.nodeValue;
    } else if (XMLvars[i].nodeName == "localtime") {
    wxtime = XMLvars[i].firstChild.nodeValue;
    }
    }
    }

    Anyone know what I'm doing wrong or is there anything I can do differently to
    load the XML without crashing the CSharp program...

    Thanks

    XML Usage Guest

  2. #2

    Default Re: XML Open/Write Error

    Looks like a CSharp issue with file permissions. Looks like the Csharp script
    is attempting to write to the xml at the same time flash is reading and parsing
    it, and this is sure to happen if both writing and reading are occurring in an
    asynchronous way. Have you tried using sockets instead of xml files? I would
    recommend you take a look at the XMLSocket class in flash.

    GenaroRG Guest

Similar Threads

  1. Replies: 5
    Last Post: August 17th, 07:15 AM
  2. #25794 [Asn->Csd]: Cannot open existing hash db3 file with write
    By helly@php.net in forum PHP Development
    Replies: 0
    Last Post: November 13th, 09:00 AM
  3. Archive::Tar and write to an open filehandle
    By Andrew Hamm in forum PERL Modules
    Replies: 0
    Last Post: October 2nd, 02:10 AM
  4. Unable To Open File "..." Because It Is Already Open With Write Permission
    By PixelaseR webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: August 18th, 06:33 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139