URLLoad problem when testing a movie

Posted on 2009-05-17
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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

705 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