Solved

XML into Flash from aspx page

Posted on 2010-11-07
10
492 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What .NET website keeps me current? 9 58
How can I build my own IDE using ASP.NET MVC? 2 34
Jquey and footrable 2 36
Split in Javascript 5 31
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now