Link to home
Start Free TrialLog in
Avatar of gingermoleman
gingermoleman

asked on

XML into Flash from aspx page

Hi Experts,

Im trying to load an aspx page as XML data into a flash project. Im using URLLoader as my method of loading the XML.
 The error I get from Flash IDE is:
TypeError: Error #1088: The markup in the document following the root element must be well-formed.

If i view the page in a browser and copy and paste the entire displayed content into a local XML file, it does work (eg error is possibly misleading).

The data in the file is a list of folders, sub folders and file content which is reached by checking the folders themselves (ie no db). I reckon my SWF is loading the page too fast and as a result the code behind hasnt completed but i cant be certain.
The Flash is coverflow but im editting the FLA to make the xml path change.
Within the complete function of the loader I have:

coverflowXML=new XML(e.target.data);

this is what is throwing the error


im buidling the xml during PreInit on th ASPX and using an XMLWriter. For flash its AS3 but im using CS4
Avatar of CyanBlue
CyanBlue
Flag of United States of America image

Can you paste the content of the XML data that ASPX file is generating???

CyanBlue
Avatar of gingermoleman
gingermoleman

ASKER

CB,

XML as generated by the page. Let me know if theres anything else that might help. Ive done Rss readers before so im probably missing something very simple.

<?xml version="1.0" encoding="utf-8" ?>
<coverflow imageWidth="151" imageHeight="151" imagePadding="1" coverflowSpacing="40" startIndex="0" startIndexInCenter="yes" coverLabelPositionY="240" coverSlidePositionY="270" transitionTime="0.5" centerCoverflowZPosition="-125" target="_blank" reflectionAlpha="35" reflectionRatio="50" reflectionDistance="0" reflectionUpdateTime="-1" reflectionDropoff="0.75">
  <cover img="1.jpg" title="5486" link="5486" />
  <cover img="1.jpg" title="6305" link="6305" />
  <cover img="1.jpg" title="6658" link="6658" />
  <cover img="1.jpg" title="6659" link="6659" />
  <cover img="1.jpg" title="6908" link="6908" />
  <cover img="1.jpg" title="6948" link="6948" />
  <cover img="1.jpg" title="7063" link="7063" />
  <cover img="1.jpg" title="7153" link="7153" />
  <cover img="1.jpg" title="7154" link="7154" />
  <cover img="1.jpg" title="7155" link="7155" />
  <cover img="1.jpg" title="7167" link="7167" />
  <cover img="1.jpg" title="7172" link="7172" />
  <cover img="1.jpg" title="7173" link="7173" />
  <cover img="1.jpg" title="7174" link="7174" />
  <cover img="1.jpg" title="7215" link="7215" />
  <cover img="1.jpg" title="7217" link="7217" />
  <cover img="1.jpg" title="7218" link="7218" />
  <cover img="1.jpg" title="7219" link="7219" />
  <cover img="1.jpg" title="7226" link="7226" />
  <cover img="1.jpg" title="7227" link="7227" />
  <cover img="1.jpg" title="7228" link="7228" />
  <cover img="1.jpg" title="7229" link="7229" />
  <cover img="1.jpg" title="7230" link="7230" />
  <cover img="1.jpg" title="7231" link="7231" />
  <cover img="1.jpg" title="7232" link="7232" />
  <cover img="1.jpg" title="7233" link="7233" />
  <cover img="1.jpg" title="7234" link="7234" />
  <cover img="1.jpg" title="7235" link="7235" />
  <cover img="1.jpg" title="7236" link="7236" />
  <cover img="1.jpg" title="7237" link="7237" />
  <cover img="1.jpg" title="7238" link="7238" />
  <cover img="1.jpg" title="7239" link="7239" />
  <cover img="1.jpg" title="7240" link="7240" />
  <cover img="1.jpg" title="7241" link="7241" />
  <cover img="1.jpg" title="7242" link="7242" />
  <cover img="1.jpg" title="7243" link="7243" />
  <cover img="1.jpg" title="7353" link="7353" />
  <cover img="1.jpg" title="7403" link="7403" />
  <cover img="1.jpg" title="7411" link="7411" />
  <cover img="1.jpg" title="7452" link="7452" />
  <cover img="1.jpg" title="7453" link="7453" />
  <cover img="1.jpg" title="7457" link="7457" />
  <cover img="1.jpg" title="7458" link="7458" />
  <cover img="1.jpg" title="7459" link="7459" />
  <cover img="1.jpg" title="7460" link="7460" />
  <cover img="1.jpg" title="7461" link="7461" />
  <cover img="1.jpg" title="7487" link="7487" />
  <cover img="1.jpg" title="7488" link="7488" />
  <cover img="1.jpg" title="7503" link="7503" />
  <cover img="1.jpg" title="7504" link="7504" />
  <cover img="1.jpg" title="7505" link="7505" />
  <cover img="1.jpg" title="7635" link="7635" />
  <cover img="1.jpg" title="7636" link="7636" />
  <cover img="1.jpg" title="7637" link="7637" />
  <cover img="1.jpg" title="7638" link="7638" />
  <cover img="1.jpg" title="7639" link="7639" />
  <cover img="1.jpg" title="7640" link="7640" />
  <cover img="1.jpg" title="7641" link="7641" />
  <cover img="1.jpg" title="7642" link="7642" />
  <cover img="1.jpg" title="7643" link="7643" />
  <cover img="1.jpg" title="7644" link="7644" />
  <cover img="1.jpg" title="7645" link="7645" />
  <cover img="1.jpg" title="7646" link="7646" />
  <cover img="1.jpg" title="7647" link="7647" />
  <cover img="1.jpg" title="7648" link="7648" />
  <cover img="1.jpg" title="7649" link="7649" />
  <cover img="1.jpg" title="7650" link="7650" />
  <cover img="1.jpg" title="7651" link="7651" />
  <cover img="1.jpg" title="7652" link="7652" />
  <cover img="1.jpg" title="7675" link="7675" />
  <cover img="1.jpg" title="7675" link="7675" />
  <cover img="1.jpg" title="7676" link="7676" />
  <cover img="1.jpg" title="7676" link="7676" />
  <cover img="1.jpg" title="7677" link="7677" />
  <cover img="1.jpg" title="7677" link="7677" />
  <cover img="1.jpg" title="7678" link="7678" />
  <cover img="1.jpg" title="7678" link="7678" />
  <cover img="1.jpg" title="7679" link="7679" />
  <cover img="1.jpg" title="7679" link="7679" />
  <cover img="1.jpg" title="7680" link="7680" />
  <cover img="1.jpg" title="7680" link="7680" />
  <cover img="1.jpg" title="7755" link="7755" />
  <cover img="1.jpg" title="7758" link="7758" />
  <cover img="1.jpg" title="7759" link="7759" />
  </coverflow>

Hrm...  I don't see anything unusual...

Try getting rid of this line from the ASPX page to see if it makes any difference...
   <?xml version="1.0" encoding="utf-8" ?>

CyanBlue
CB,

I dont explicitly set that line, its created when I start the xmlDocument so I dont know how to remove it.
Also, if I paste that xml into a local file then my swf works fine.

What I failed to mention is that the page is behind a secure login so now im thinking that this whole question is just wrong and what Im actually asking is how pass login details with the request.



daveP
The only way I know of is doing the following URL but I also know this does not work on all the browsers including the IE...
   http(s)://username:password@server/file.ext

CyanBlue
Cb,

Thanks for your time, but the more I think about this the more im certain that im just plain wrong.
The SWF will end up on a page behind the logon with the ASPX xml page.
I beleive this will resolve the need to pass credentials as i'll already be in a session.

I recall there needing to be a permissions xml file to allow flash to access xml files (something to do with sandbox security).

I'll try applying this as well.

Again, sorry for asking the wrong questions and wasting your time

daveP
ASKER CERTIFIED SOLUTION
Avatar of CyanBlue
CyanBlue
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yup, thanks for the input
Good to have a soundboard, ultimately was asking the wrong questions
Um, you could have just closed the topic, but thank you...  :)

CyanBlue