Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Security warning when calling PHP file from SWF

Posted on 2007-07-24
Medium Priority
Last Modified: 2010-04-03
I have an SWF file on my website that sends data to a PHP file on my server.  The PHP file then queries a database and returns data back to the SWF file.  When I run the file from www.mydomain.com, it works fine.  However, if I run it from mydomain.com, I get the following security warning:

"Adobe Flash Player Settings
mydomain.com is attempting to read from www.mydomain.com.  This is a potentially insecure operation.  Do you want to allow it?"

What can I do to prevent this security warning from appearing?
Question by:BruceTD
  • 2
LVL 37

Accepted Solution

CyanBlue earned 500 total points
ID: 19556608
Flash treats www.domain.com and domain.com as two different domain names...  So, just make sure that you are using only one...  That should save any future trouble...  ;)
Also check on the System.security.allowDomain() function...


Author Comment

ID: 19565234
Thanks, CyanBlue!

System.security.allowDomain() was what I needed. I added the following line of code to the beginning of my actionscript, and everything works fine:


Thanks again.

LVL 37

Expert Comment

ID: 19565310
Cool...  Glad to help...  :)


Featured Post

Technology Partners: 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!

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

580 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