icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.
Old February 6th, 2008, 1:02 AM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jul 2003
9 posts
Gave thanks: 0
Thanked 0 times
Flash stuck in it's own security sandbox

First off, I have two sites, one which is a subdomain of the other.

I'm trying to get a small seed program I've written in flash/actionscript 3 and uploaded to the subdomain to access a PHP file on the subdomain (of course both reside in the directory pointed to by the subdomain settings).

The whole thing works great when run in Flash CS3 from my local machine, but I get a Security Error #2048 when I access the flash file on the server. The php file returns the right response when I access it directly (it will eventually talk to the mysql server), and when the flash file is run from my local PC it accesses the php file on the server just fine. The Actionscript code refers to the php file as 'http://www.subdomain.net/file.php'.

I've published the flash file as a "network access only" .swf (as opposed to local access only), and also placed a crossdomain.xml file at / /public_html and /public_html/subdomain that looks like this:

Code:
<?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="*" to-ports="*" secure="false" />
</cross-domain-policy>
Anyone have any idea why flash still won't let me out of the security sandbox and allow access to the php file when the .swf is on the server?
newrep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 7th, 2008, 1:46 PM   #2 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jul 2003
9 posts
Gave thanks: 0
Thanked 0 times
I've changed the publishing settings to "local access only" and set the URL loader to point to a relative pathname. That fixed the issue for me. Of course if anyone was actually required to access the network they'd be screwed....
newrep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On