GG's Flash Blog

04/21/07

Cross-domain policy

Permalink 03:34:29 pm, Categories: Flash & XML, 290 words

Issue:

  • Unable to load variables or XML data into a Flash movie from another domain/subdomain.
  • Unable to load swf or flv into Flash movie from another domain/subdomain.

Reason:
For security reasons, data loading operations (load, loadMovie, loadVariables, & etc.) from a different domain is not permitted.

Solution:
Create a cross-domain policy file (crossdomain.xml) and place on the site root of the server you wish to access with the movie.

Cross-domain policy files is a simple XML file that gives the Flash Player permission to access data from a given domain without displaying a security dialog, the file can be created in a simple text editor such as Notepad or SimpleText.

  • Sample Cross-domain policy file allow access from any domain

    <?xml version="1.0"?>
    <cross-domain-policy>
    <allow-access-from domain="*" />
    </cross-domain-policy>

  • Sample Cross-domain policy file allow access from any subdomains & local server, & secure server

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="www.ggshow.com" />
    <allow-access-from domain="ggshow.com" />
    <allow-access-from domain="*.ggshow.com" />
    <allow-access-from domain="blog.ggshow.com" />
    <allow-access-from domain="search.ggshow.com" />
    <allow-access-from domain="blog" />
    <allow-access-from domain="search" />
    <allow-access-from domain="www.ggshow.com" secure="false" />
    </cross-domain-policy>

  • Sample Cross-domain policy file on other websites

Additional Information:
crossdomainxml.org

LiveDocs:
Using policy files

TechNote:
External data not accessible outside a Macromedia Flash movie's domain
Loading data across domains
Macromedia Flash movie fails to load data in Flash Player 7

Permalink Share/Save/Bookmark Subscribe Send feedback

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

This post has 1 feedback awaiting moderation...

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Previous post: How to use subscript & superscript in dynamic and input text fieldNext post: A Brief History of Flash

XeerSoft - Web-based Integrated Global Business Solution Provider

Accounting, Inventory, Reservation, Transportation, Commission, Point of Sale (POS), CRM, Membership, Time Attendance, Payroll, Human Resource, Manufacturing, Merchandising, Financial, Workflow...
http://www.xeersoft.com


Your ads here

Flash Reference

To share what I have learned from people who have shared.

 << <March 2010> >>
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Search

Categories

Archives

Who's Online?

Account

Syndicate

Donation

If you find GG's Flash extensions or any of our resources useful, help support future development by making a donation.

Ads

Valid XHTML || Valid CSS || Valid RSS || Valid Atom

Copyright © 2006-2009 GGSHOW. All Rights Reserved.
GGSHOW.COM | GGSHOW.NET
eBoaY | tuBabe | syndicater | Nobody's Website | NeverTheLink | NiShiZuiHaoDeNiZhiDaoMa | WorldCoin