-
Senior Member
[RESOLVED] CS4 AS3 - Loading ASP generated XML
Keep getting this error when trying to load some asp generated xml into flash:
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://evildesign/gallery.asp
at com::loadXML()
at mc_gallery_thumbs/frame1()
at flash.display::MovieClip/gotoAndPlay()
at mc_menu/changePage()
at MethodInfo-194()
any ideas why?
If I copy and paste the source code of the asp page into an xml file it works fine.
Cheers
-
Load the asp page in your browser. See whether it looks right, or whether there is an asp error generated. Flash does not care how the xml is generated, as long as it's correct.
If the asp actually generates xml, you may have to explicitly set the mime-type.
-
Senior Member
Like I said if I copy and paste the source code of the asp page into an xml file it works fine.
And if I look at the page the xml looks fine.
Code:
<%
Response.ContentType = "text/xml"
Response.Write "<?xml version=""1.0""?>"
Set oFs = Server.CreateObject("Scripting.FileSystemObject")
FullPath = Server.MapPath(".")&"\gallery"
If oFs.FolderExists(FullPath) Then
Set oFolder = oFs.GetFolder(FullPath)
output = "<Images>"
For Each oFile In oFolder.Files
if oFile.Name <> "Thumbs.db" Then
output = output & "<Image>"
' Loop through the fields in each record.
strName = oFile.Name
If Len(strName) > 0 Then strName = Server.HTMLEncode(strName)
output = output & "<Url>" & strName & "</Url>"
' Move to next record in database.
' Output end of record.
output = output & "</Image>"
End If
Next
output = output & "</Images>"
Response.Write output
End If
%>
thats the code that generates it. I have set the content type at the top already.
Thanks for help
Any ideas?!
-
I take it by "source code of the asp page" you actually mean the output of the asp page. What you have pasted above is the actual source code of the asp page. The output of the asp page is what's relevant.
Although I don't know asp, it appears that that output would look like:
Code:
<?xml version="1.0"?>
<Images>
<Image>
<Url>somecontent</Url>
</Image>
</Images>
Which, other than lacking indentations, looks fine.
Other things to check: Are you positive that the url you are attempting to load is correct? Is it on the same domain as the swf? If it's not, does the domain with the asp page have an appropriate crossdomain.xml file?
Check out this blog post on the error you recieved:
http://www.judahfrangipane.com/blog/?p=87
-
Senior Member
I mean what is generated looks fine and like XML should. URL is fine and in the same place as the swf.
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
|