A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [RESOLVED] Flash Player 9 / load xml issue

  1. #1
    Senior Member
    Join Date
    Nov 2005
    Location
    Milan
    Posts
    119

    [RESOLVED] Flash Player 9 / load xml issue

    Hi all,

    I've got a Flash 8 swf which reads in XML generated by ASP, as the info is pulled from a SQL Server DB. Therefore, my xml.load calls in a .asp instead of a .xml, but this was working perfectly in Flash Player 8 as the asp generated well-formed xml and Flash was happy enough with it.

    It's now stopped working in Firefox with the Flash Player 9, but still works in IE with Player 9.

    Does anybody have any suggestions for a quick fix or do I have to write scripts to generate an actual XML page every time someone updates the DB and read in a file with a .xml extension?

    Thanks a lot!
    CaroD

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Do you mean something like this?

    xml.sendAndLoad ("http://www.domain.com/xml.asp", target_xml, "POST");
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member
    Join Date
    Nov 2005
    Location
    Milan
    Posts
    119
    I was just using load:

    var newsXML:XML = new XML();
    newsXML.ignoreWhite = true;
    newsXML.load("http://www.domain.com/xml.asp");

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Yeah, that is similar. I have the same problem, but did not know it is because of the player. I thought it was because of a server change. I use only FF. I will try to work it out over the weekend, but what you can try is the following:

    Instead of XML, create a LoadVars object.
    var lv:LoadVars = new LoadVars();
    lv.onLoad = function()
    {
    xmlparse(this);
    }
    lv.load("http://www.domain.com/xml.asp");

    function xmlparse(newXML)
    {
    var myXML:XML = new XML(newXML);

    and so on.

    Let me know if that works. I cannot test it, because i don't have Flash here at the moment.
    - The right of the People to create Flash movies shall not be infringed. -

  5. #5
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Ok,

    it is a little bit more complicated than I wrote above. You can test it with an xml file with the .asp extension:
    PHP Code:
    var lv:LoadVars = new LoadVars ();
    lv.onLoad = function ()
    {
        var 
    myXML:String unescape (this);
        var 
    a:Array = myXML.split ("&onLoad");
        
    myXML a[0];
        var 
    newXML:XML = new XML ();
        
    newXML.ignoreWhite true;
        
    newXML.parseXML (myXML);
        
    myText.text newXML.firstChild;
    };
    lv.load ("f.asp"); 
    I tested this in FF and Safari.
    - The right of the People to create Flash movies shall not be infringed. -

  6. #6
    Senior Member
    Join Date
    Nov 2005
    Location
    Milan
    Posts
    119
    Excellent, thanks a million!

  7. #7
    Junior Member
    Join Date
    Jan 2006
    Posts
    12
    Quote Originally Posted by cancerinform
    Ok,

    it is a little bit more complicated than I wrote above. You can test it with an xml file with the .asp extension:
    PHP Code:
    var lv:LoadVars = new LoadVars ();
    lv.onLoad = function ()
    {
        var 
    myXML:String unescape (this);
        var 
    a:Array = myXML.split ("&onLoad");
        
    myXML a[0];
        var 
    newXML:XML = new XML ();
        
    newXML.ignoreWhite true;
        
    newXML.parseXML (myXML);
        
    myText.text newXML.firstChild;
    };
    lv.load ("f.asp"); 
    I tested this in FF and Safari.

    Thank you very much. I was having trouble posting to the server using XML.sendandload through flash media server, so i did it this way and it worked perfectly.

    A lil research before making a new thread does pay off.

  8. #8
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Glad it worked out .
    - The right of the People to create Flash movies shall not be infringed. -

  9. #9
    Junior Member
    Join Date
    Jan 2009
    Posts
    1

    Thumbs up Thanks a Ton

    i have been searching for a solution for this flash player 10 security problem for hours

    i finally found you thanks a ton dude, you are so great, you are a life saver.

    i wish you a good good year ahead.
    thank you thank you thank you...

  10. #10
    I Love India Nalini_v's Avatar
    Join Date
    Jun 2007
    Location
    Chennai
    Posts
    195
    Hi.. cancerinform.. How do we call asp file as we calling php.. do u have any samples??? I tried it like the above sampl only it is working.. But i to execute the asp file.. how do i do?

    Please help

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