Testing SWF with external XML file, strange problem.

Hi!
My problem started after migration to 2.01. But I think it's
not version problem.
I have old project which uses external XML files ("
http://www.mydomain.com/myxml.xml").
When I teste project in "bin" folder it works perfect and SWF
import data from XML.
I created new Flex project and copied all scripts from old
one. And my new app can't read external XML!!! (tested in "bin"
folder):
*** Security Sandbox Violation ***
Connection to xmlURL halted - not permitted from
file:///C:/myproject/bin/myproject-debug.swf
BUT when I copy my new SWF to the old project "bin" folder
then it WORKS! Strange!
I found in Help "The Global Flash Player Trust directory" and
I checked files: "flexbuilder.cfg", "flexbuilder.fbr" there are all
my project paths (old and new).
Thanks for help!
newman

You should your homework with Google and other search engines
better ;)
http://www.robrusher.com/1/2006/08/Flex-2-Error-with-XML.cfm

Similar Messages

  • Populating Tree with External XML File

    I want to use external files for populating Flex 3
    components. I have been successful using code very similar to that
    below for a data grid & for a combo box, but it won't work for
    a tree. Can you determine wh?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:HTTPService id="dp_Tree1" url="Tree1.xml" />
    <mx:Tree dataProvider="{dp_Tree1.lastResult.root.node}"
    creationComplete="dp_Tree1.send()" width="333"/>
    </mx:WindowedApplication>
    It's not working & I can't determine why. Attached is my
    xml file that I tested it with.

    Thanks a bunch folks, but my intent is to have as little code
    as possible. I want to help people who are not coders create
    designs using external xml files to populate controls. I was able
    to create very simple code with just two lines to populate a
    DataGrid from an external xml file:
    <mx:HTTPService id="dp_DataGrid1" url="DataGrid1.xml"
    />
    <mx:DataGrid
    dataProvider="{dp_DataGrid1.lastResult.component.rows}"
    creationComplete="dp_DataGrid1.send()" />
    And just two lines for a ComboBox:
    <mx:HTTPService id="dp_ComboBox1" url="ComboBox1.xml"
    />
    <mx:ComboBox
    dataProvider="{dp_ComboBox1.lastResult.component.rows}"
    creationComplete="dp_ComboBox1.send()" />
    Isn't it possible to populate a tree with two lines like as
    it is with a DataGrid & ComboBox?

  • Swf with external .as files not working in Captivate

    Hello,
    I am using Flash Professional CS5.5 & Captivate 5.5 (purchased with eLearning suite).
    When I insert swf animations into Captivate that have external .as files they do not work.
    Tried both insert animation & insert animation slide - same results.
    I placed the .as files in the same file as my Captivate project and have tried multiple setting options.
    The FPS are set to 30.
    I had the same problem with external audio files and had to embed the audio into my fla to get it to play in Captivate.
    Does Captivate just not allow external files?
    Any help/insight is appreciated!!
    Les-

    The most likely reason for this failure is that since your SWF is now embedded into another SWF (the Captivate project) the paths to the AS files need to be altered in Flash to allow for this.
    You need to investigate how this would be done in AS code if your Flash SWF was a symbol inside another Flash SWF.

  • How can I set connection to external XML file with Dreamweaver to buiild AIR app?

    Hello,
    I try to do simple AIR app in dreamweaver. It's not problem
    to use static data. But I'd like to use dynamic data from external
    XML file. I try to use Spry and evrything works fine in web browser
    but i have problem with loading external XML data into my app in
    AIR. Can I simply transform my spry based html app into AIR?
    What should I add to do this?
    Pawel

    Daniel Lichtenwald wrote:
    What are the requirements and steps for arranging to receive this large file using File Transfer Protocol (FTP)?
    Usually, we don't speak of "receive" when using FTP, since the file is transferred from server to client, so it's more of a case of "download".
    At your end, it's simple. You use an FTP client; under SL, that includes Finder and Safari, so you don't even need to get any additional software.
    At the other end, it's more complicated; the 'sender' must set up an FTP server on his machine.
    Alternatively, you can set up your own Mac as an FTP server, and have the 'sender' connect to you with an FTP client and upload the file; but, if your Mac lives behind a router, then you have more work to do with the router settings.
    That's why it's much easier to use the file sharing services mentioned above -- if they are available in both sender's and receiver's locations. (Keep in mind that some countries block access to all those mentioned -- except perhaps <www.transfer.ro>, of which I know absolutely nothing.)

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • Media files prevent Flash from fully loading external XML file

    Im trying to debug a flash widget we created, and it loads
    fine on the 20 odd computers we tested on EXCEPT for one computer
    where, the application doesn't load an external XML file that calls
    for 3 small mp3 files and a FLV file to load as well.
    In a debugger, we noticed that when it tried to load these
    mp3 files it was getting a Forbidden access message. The FLV just
    prevents the FLV player from showing up at all (not even the skin).
    Can anyone figure out why, that it would work over all the
    other computers and NOT the one? On that person's computer, we
    tried it in IE, Firefox, even Chrome and the application doesn't
    load. We even cleared the cache, did a hard refresh and still
    nothing.
    However, the other computers work just fine.
    ALL the computers have the latest Flash software installed.
    What could cause this problem?

    Actually what worked was removing 'xmldoc' from the php script. So $data =$GLOBALS["HTTP_RAW_POST_DATA"]; instead of $data = xmldoc($GLOBALS["HTTP_RAW_POST_DATA"]);
    Couldn't find anything about 'xmldoc'. Is it used for anything in php?
    Anyway, the loading error went away, but then I got into problems with getting the return echoed values back. The textfield stayed empty even when saving the data.txt file worked.
    I then placed the <stuff> tags between <root> tags and then flash got the sentences between the <stuff> tags back. Why does Flash need the returned xml output to be between <root> tags for it to see the content between the <stuff> tags? So why do I need to use echo("<root><stuff>Server unable to create file.</stuff></root>"); instead of cho("<stuff>Server unable to create file.</stuff>");?

  • External XML files in Flash iPhone apps

    Hi everyone. I know that apple has loosened up on what is and isn't allowed on the app store these days, such as flash. I was thinking of writing an app that would call upon a web based xml file to call up pictures to display in the iPhone.
    I know Apple doesn't allow apps that call upon external scripts but it's not an executable script, its a list of images and where they are stored. Does anybody have any input on whether Apple may have a problem with this?
    Cheers

    don't know.
    I'm not sure of the differences between actionscript in flash and javascript in the browser but you could call for an XML file to be sent as json data from the script if accessing external XML files directly is not allowed.
    Problem is that XML can contain anything you want it too... it could contain a script itself.

  • TransformerHandler throws OutOfMemoryError with large xml files

    i'm using TransformerHandler to convert any content to SAX events and transform it using XSLT into an XML file.
    the problem is that for large amount of content i get a OutOfMemoryError.
    it seams that the content is kept in memory and only flushed when i call handler.endDocument();
    i tried using auto flush writers as the Result, or call the flush() method myself, but nothing.
    here is the example - pls help!
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.xml.sax.helpers.AttributesImpl;
    public class Test
          * test handler memory usage
          * @param loops no of loops - when large enogh - OutOfMemoryError !!!
          * @param xsltFilePath xslt file
          * @param targetXmlFile output xml file
          * @throws Exception
         public static void testHandlerMemUsage(int loops, String xsltFilePath, String targetXmlFile)throws Exception
              //verify SAX support
              TransformerFactory factory = TransformerFactory.newInstance();
              if(!factory.getFeature(SAXTransformerFactory.FEATURE))
                   throw new UnsupportedOperationException("SAX tranformations not supported");
              TransformerHandler handler=
                   ((SAXTransformerFactory)factory).newTransformerHandler(new StreamSource(xsltFilePath));
              handler.setResult(new StreamResult(targetXmlFile));
              handler.startDocument();
              handler.startElement(null,"root","root",new AttributesImpl());
              //loop
              for(int i=0;i<loops;i++)
                   handler.startElement(null,"el-"+i,"el-"+i,new AttributesImpl());
                   handler.characters("value".toCharArray(),0,"value".length());
                   handler.endElement(null,"el-"+i,"el-"+i);
              handler.endElement(null,"root","root");
              //System.out.println("end document");
              //only after endDocument() starts to print..
              handler.endDocument();
              //System.out.println("ended document");
         public static void main(String[] args)throws Exception
              System.out.println("--starting..");
              testHandlerMemUsage(500000,"/copy.xslt","/testHandlerMemUsage.xml");
              System.out.println("--we are still here -- increase loops..");
    }

    Did you try increasing memeory when starting java with the -Xmx parameter? You know that java uses only 64MB by default, so you might need to increase it to e.g. 256MB for your XML to work.

  • Does a swf lock a xml file open when reading?

    I have a swf news reader that reads from an xml file which is written by an asp script from a mysql database, we seem to be having problems when updating with new news stories the xml file does not update.
    Does anyone know if the news reader swf locks the xml file when reading? so it cant be overwritten by the new data.
    Many thanks...
    Oli

      Is the file type extension still attached at the end of the file name?
    It sounds like you are dealing with 10 corrupted files.
    If there are no privacy concerns, can you upload one of those files to the FTP service of your choice—such as yousendit.com, Dropbox, etc,—and post the link here so others can try opening them?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Best way to fill CLOB with external XML from URL

    There seem to be a number of great tools available for pl/sql developers in the 8i DB environment and I am tryng to get a handle on them. So far I have worked with XSQL servlet (not PL/SQL), XML Parser and XSU.
    The problem I have is to fill a clob from an external xml file via a url and then make that clob available for DBMS_XMLSave to insert into DB. What is the best way to do this? I am thinking maybe I have to use utl_http or utl_tcp to fill the CLOB since I can't seem to find a method in the pl/sql XDK?
    XSU - can easily generate CLOB from a query but in this case it is not a query, it is XML from url
    XMlparser - can read in from a url using parse() but the document returned is a DOMDocument rather than CLOB.
    -quinn

    There seem to be a number of great tools available for pl/sql developers in the 8i DB environment and I am tryng to get a handle on them. So far I have worked with XSQL servlet (not PL/SQL), XML Parser and XSU.
    The problem I have is to fill a clob from an external xml file via a url and then make that clob available for DBMS_XMLSave to insert into DB. What is the best way to do this? I am thinking maybe I have to use utl_http or utl_tcp to fill the CLOB since I can't seem to find a method in the pl/sql XDK?
    XSU - can easily generate CLOB from a query but in this case it is not a query, it is XML from url
    XMlparser - can read in from a url using parse() but the document returned is a DOMDocument rather than CLOB.
    -quinn

  • Import external xml file in PDF using Livecycle

    I require sending some values in main xml file from the external xml file during sending mail on button click. Doing so, I want to read values from external file into a hidden field or send the external xml/text file as an attachment.
    1. Is there any feature in live cycle to attach multiple xml/text files in mail using button click?
    2. Is there any way to read an external xml file to pre-populate a textbox using javascript?
    Kindly help me to find out the solution.
    Thanks in advance
    Vikram Kumar

    Hi,
    1) You can do this with a script. But this script works only with the Acrobat Pro not with the Adobe Reader!!
    2) Sure.
    You open your form.
    Go to File | Form Properties |  Preview | then choose your xml-file
    Then you have to got to the textobject | mark this | go to "Object" | "Binding"
    Here you can bind the field: $record.PRINTJOB.PMSDATA.ObjectNameXML (You have to adapt this in the path in your XML to the field in the XML)
    If you make a preview you will see the value of the XML in your textfield.
    You can also script the databinding. You have to go to the initalize.event and write:
    this.rawValue = xfa.record.PathToYourFieldInYourXML.ObjectNameXML.value;
    Hope it will helps you,
    Mandy

  • Build a web gallery with amazing flash slideshows with dynamic XML files

    Build a web gallery with amazing flash slideshows with dynamic XML files
    Screenshot:
    Features
    Features
    Transitions, zooming and panning effect You can  choose from  Random, Wipe from Left, Fade to White, Cross Expansion and  other 60-plus  transition effects. Zooming and panning effect is  optional for advanced flash  templates.
    XML-driven This flash slideshow are XML-driven. The XML  document allows more personalized controls over the flash.
    Auto-playback and repeat mode The flash slideshow will play  automatically after preloading, and it can repeat playback.
    Dynamic customization Besides XML control, the  advanced  templates provide many more custom options, so that you can  create slideshow  that fits into your existing web design: width ,  height, border color,  background color, thumbnail size, etc. More about  dynamic customization
    Usage and demo visit: http://webdesigndevelopment.blog.com...swf-xml-files/

    Please excuse the bump...
    Anyone with a LR flash gallery that starts with slideshow in play mode?
    Can it even be set to do this?
    The only code in the style.xml that looks like it might be realted is line 12 <playOptions playMode="pause"/>, changing that to "play" does nothing.
    Thanks,
    Donnie

  • [svn] 3638: Changing the build order of swc file update with dita xml files .

    Revision: 3638
    Author: [email protected]
    Date: 2008-10-14 16:49:56 -0700 (Tue, 14 Oct 2008)
    Log Message:
    Changing the build order of swc file update with dita xml files.
    By default this would now happen during the checkintests target - so "ant clean main" shouldn't get affected.
    To opt out use -Dno.doc=true
    QA: No
    Doc: No
    Tests: checkintests
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/frameworks/build.xml
    flex/sdk/trunk/frameworks/projects/airframework/build.xml
    flex/sdk/trunk/frameworks/projects/flash-integration/build.xml
    flex/sdk/trunk/frameworks/projects/flex/build.xml
    flex/sdk/trunk/frameworks/projects/flex4/build.xml
    flex/sdk/trunk/frameworks/projects/framework/build.xml
    flex/sdk/trunk/frameworks/projects/haloclassic/build.xml
    flex/sdk/trunk/frameworks/projects/rpc/build.xml
    flex/sdk/trunk/frameworks/projects/utilities/build.xml

    Revision: 3638
    Author: [email protected]
    Date: 2008-10-14 16:49:56 -0700 (Tue, 14 Oct 2008)
    Log Message:
    Changing the build order of swc file update with dita xml files.
    By default this would now happen during the checkintests target - so "ant clean main" shouldn't get affected.
    To opt out use -Dno.doc=true
    QA: No
    Doc: No
    Tests: checkintests
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/frameworks/build.xml
    flex/sdk/trunk/frameworks/projects/airframework/build.xml
    flex/sdk/trunk/frameworks/projects/flash-integration/build.xml
    flex/sdk/trunk/frameworks/projects/flex/build.xml
    flex/sdk/trunk/frameworks/projects/flex4/build.xml
    flex/sdk/trunk/frameworks/projects/framework/build.xml
    flex/sdk/trunk/frameworks/projects/haloclassic/build.xml
    flex/sdk/trunk/frameworks/projects/rpc/build.xml
    flex/sdk/trunk/frameworks/projects/utilities/build.xml

  • How to import external XML file

    Hello guys:
    From this demo
    http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/#section2
    we know how to use a intrernal XML document. I know there are
    several way to load a external XML like:
    <mx:HTTPService
    id="loadTest"
    useProxy="false"
    showBusyCursor="true"
    resultFormat="xml"
    url="data/login.xml"
    />
    What I want to know is whether I could load a XML file
    directly, not use HTTPService and send. For a instance:
    [Bindable]
    private var login:XML = ("data/login.xml");
    or something like that. And then I could use login.user or
    login. pass .
    Now seems it is easy to control a intrernal XML data. I want
    to import a external XML file and use it like a intrernal XML.
    Thanks a lot

    You only have 2 choices: include the XML as part of the SWF
    using <mx:XML source="filename.xml" /> or load it dynamically
    using a data service such as HTTPService.

  • XMLList to External XML File

    Hi All,
    I'm new to Flex, but I've been impressed with it so far. I
    was able to create a simple app, where things like navigation trees
    and table data were populated based on XML stored inside mx:XMLList
    tags inside the main document. In order to clean things up, I
    thought I'd move the data into external XML files. I copied the
    data out to the files, and verified the data always had a single
    top-level node. I then noted that mx:XMLList doesn't support the
    'source' attribute, so converted to using mx:XML tags inside the
    application mxml. The application now compiles, but entirety of the
    XML hierarchy displays as a single node, instead of being parsed
    into tree nodes. Any idea what I'm missing here? And thanks in
    advance for going easy on the noob. ;-)
    - Josh

    Spoke too soon. Looks like that top node thing is right, as
    it's only passing in the first node from each xml datasource. It
    must've been doing that before, but since the top-node didn't have
    a label, it displayed all the children as the label.
    So by adding the top-level node to the XML, my guess is that
    when I call my data from the dataProvider, I'll have to add
    something to bypass this extra layer of hierarchy, right?
    Currently my app code has:
    <mx:XML id="deviceTree" source="deviceTree.xml" />
    <snip/>
    <mx:Tree dataProvider="{deviceTree}" />
    and my XML (deviceTree.xml) with the new added top node is
    now:
    <?xml version="1.0" encoding="utf-8"?>
    <devices>
    <node label="Foo">
    <node label="Foo1" />
    <node label="Foo2" />
    </node>
    <node label="Bar">
    <node label="Bar1" />
    <node label="Bar2" />
    </node>
    </devices>
    I tried changing the dataProvider to {deviceTree.devices} but
    to no avail. Can someone throw me a line?

Maybe you are looking for