|
-
[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
-
Senior Member
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. -
-
I was just using load:
var newsXML:XML = new XML();
newsXML.ignoreWhite = true;
newsXML.load("http://www.domain.com/xml.asp");
-
Senior Member
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. -
-
Senior Member
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. -
-
Excellent, thanks a million!
-
 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.
-
Senior Member
Glad it worked out .
- The right of the People to create Flash movies shall not be infringed. -
-
-
I Love India
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|