Flash xml cannot be loaded by flex. Unprocessed ioError text = Error #2032

Source: Internet
Author: User

I recently wrote an mp3 player.

The main class of as3 to load config. xml in the xml package

Simple code:

UrlRequest = new URLRequest ("xml/config. xml ");

UrlLoader = new URLLoader ();

UrlLoader. addEventListener (Event. COMPLETE, onLoadXml );

UrlLoader. load (urlRequest );

 

And read the songs in config. xml.

<Song url = "music/a1.mp3"/>

Open player. SWF separately to load xml and play songs.

 

Only player.swfcan be opened for config.xmland a.mp3.

 

However, if we put index.swfto the server, the player.swf is stored in index.

An error is reported when I open it from ie.

Error #2044: unprocessed ioErrpr text = Error #2032 stream Error.

 

 

Solution:

Because the player calls the xml/config. xml file song relative to itself, it is also relative to its own music/a.mp3 file.

And add player.swf to index.swf. The relative path is not referenced by player. The index is used as a reference.

 

Therefore, you need to put the xml package and music package in the same directory as index.swf.

 

 

 

 

 

Appendix

Solve crossdomain. xml in the Security Sandbox

<? Xml version = "1.0"?>

<Cross-domain-policy>

<Allow-access-from domain = "* .cnblogs.com"/>

<Allow-access-from domain = www.anotherofSite.com/>

</Cross-domain-policy>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.