Solved

XML into Flash from aspx page

Posted on 2010-11-07
10
497 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:gingermoleman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 37

Expert Comment

by:CyanBlue
ID: 34083465
Can you paste the content of the XML data that ASPX file is generating???

CyanBlue
0
 
LVL 5

Author Comment

by:gingermoleman
ID: 34083484
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>

0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 34083548
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:gingermoleman
ID: 34083675
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
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 34084787
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
0
 
LVL 5

Author Comment

by:gingermoleman
ID: 34085278
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
0
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 34085372
One that goes with the security is called crossdomain.xml file...

I'd say close this topic and create another one and start afresh...  ;)

CyanBlue
0
 
LVL 5

Author Comment

by:gingermoleman
ID: 34086168
yup, thanks for the input
0
 
LVL 5

Author Closing Comment

by:gingermoleman
ID: 34086184
Good to have a soundboard, ultimately was asking the wrong questions
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 34086365
Um, you could have just closed the topic, but thank you...  :)

CyanBlue
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question