Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more


URLLoad problem when testing a movie

Posted on 2009-05-17
Medium Priority
Last Modified: 2015-01-05
I am using URLLoader to load data from a remote server.  I have a crossdomain policy file on the remote server setup to allow access from anywhere, and all works as expected (i.e. the loaded() function is called)  if I load the SWF from the same domain (, or a different domain ( or if I run the local swf in a standalone player, or if I debug the movie in Flash CS3 (Ctrl-shift-enter).  But if I test the movie from Flash (Ctrl-Enter) I get an ioError "Error #2032: Stream Error. URL:"

What's happening here?
var connxn:URLLoader;
var urlRequest:URLRequest;
connxn=new URLLoader();
connxn.addEventListener(Event.COMPLETE, loaded);
connxn.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
urlRequest=new URLRequest('http://www.mydomain/myscript.php');
try {
} catch (error:SecurityError) {
	dbg.text = 'security error';
function loaded(e:Event) {
	dbg.text = 'loaded';
function errorHandler(e:IOErrorEvent):void {
	dbg.text = e.text;

Open in new window

Question by:jashaw
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 22

Expert Comment

ID: 24412961

This doesn't sound like a code issue, but more of a security issue, as you have already found out.

maybe try to change your local FLA/SWF playback settings to "Access Network only".

here are some other articles that might point you in the right direction...

what does your "myscript.php" do?  what are you loading into the Loader?

rp / ZA


Author Comment

ID: 24415160
The local playback settings are already at "Network only".  I assume it is a security issue, but my crossdomain policy file is obviously correct since I can access myscript.php for the swf loaded from other domains, and from my local machine if I use the standalobe player.

myscript.php simply echos some text ... literally "<?php echo "blah"; ?>

I guess the question is, why is the standalone player behaving differently from the player invoked directly from the IDE?
LVL 22

Expert Comment

ID: 24415305

mainly because they are different...  Flash, the IDE, has these permissions, but for some reason your environment is not allowing this...

have you tried this on another computer?

this one I think has stumped me  :)

rp / ZA

LVL 39

Accepted Solution

blue-genie earned 1500 total points
ID: 24509372
try this from help file

The Global Flash Player Trust directory
Administrative users and installer applications can register specified local SWF files as trusted. These SWF files are assigned to the local-trusted sandbox. They can interact with any other SWF files, and they can load data from anywhere, remote or local. Files are designated as trusted in the Global Flash Player Trust directory, which is in the same directory as the mms.cfg file, in the following locations (locations are specific to the current user):

Windows: system\Macromed\Flash\FlashPlayerTrust
(for example, C:\windows\system32\Macromed\Flash\FlashPlayerTrust)

Mac: app support/Macromedia/FlashPlayerTrust
(for example, /Library/Application Support/Macromedia/FlashPlayerTrust)

The Flash Player Trust directory can contain any number of text files, each of which lists trusted paths, with one path per line. Each path can be an individual SWF file, HTML file, or directory. Comment lines begin with the # symbol. For example, a Flash Player trust configuration file containing the following text grants trusted status to all files in the specified directory and all subdirectories:

# Trust files in the following directories:
C:\Documents and Settings\All Users\Documents\SampleApp

The paths listed in a trust configuration file should always be local paths or SMB network paths. Any HTTP path in a trust configuration file is ignored; only local files can be trusted.

To avoid conflicts, give each trust configuration file a filename corresponding to the installing application, and use a .cfg file extension.

As a developer distributing a locally run SWF file through an installer application, you can have the installer application add a configuration file to the Global Flash Player Trust directory, granting full privileges to the file that you are distributing. The installer application must be run by a user with administrative rights. Unlike the mms.cfg file, the Global Flash Player Trust directory is included for the purpose of installer applications granting trust permissions. Both administrative users and installer applications can designate trusted local applications using the Global Flash Player Trust directory.

There are also Flash Player Trust directories for individual users (see the next section, User controls).
LVL 22

Expert Comment

ID: 24530897
Please finish up the question.

rp / Flash Zone Advisor

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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.

647 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