Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 07:41
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash and AS 3 (Moderators: papachan, kofi addaquay)
| | |-+  Error #2044 (ioError) and Error #2032 (Stream Error) While loading URL
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: Error #2044 (ioError) and Error #2032 (Stream Error) While loading URL  (Read 3514 times)
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« on: 12/27/09, 20:49 »

I am trying to load a URL. And when I execute it, it returns the #2044 and #2032 errors. Look my AS:

Code:
var TempUserID:Number = Math.round(Math.random()*99999999999999999)
var _TempUserID:Number = Math.round(Math.random()*9999999999999999);

var newURLParameter = TempUserID+'125478'+_TempUserID;
var thisPage = 'dynamic/InternalProcess.cfm?RequestCod=FlashApplication';
var newPage = thisPage+'&TempUserID='+newURLParameter;
var page = 'dynamic/TemFiles-UserIDs/'+newURLParameter+'.txt';

var requisicao:URLRequest = new URLRequest(newPage);
var loader:URLLoader = new URLLoader();
var loading = loader.load(requisicao);

loader.addEventListener(Event.COMPLETE,ShowData);

function ShowData(event:Event):void {

var _requisicao:URLRequest = new URLRequest(page);
var _loader:URLLoader = new URLLoader();
var _loading = loader.load(_requisicao);


_loader.addEventListener(Event.COMPLETE,_ShowData);

function _ShowData(event:Event):void {
var newLoader:URLLoader = URLLoader(event.target);
var valor = new URLVariables(newLoader.data);
trace(valor.ToReturnToFlash);
}

var Delete:URLRequest = new URLRequest(newPage+'&Delete');
var _Delete:URLLoader = new URLLoader();
var __Delete = loader.load(Delete);

}

Can somebody tell me where is my mistake?
Thanks!
« Last Edit: 12/28/09, 13:04 by OsmarFraga » Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #1 on: 12/28/09, 01:00 »

This is security sandbox error.
That means, you are trying to call data from a different domain thand the original domain and dont have crossdomain.xml in place.
Logged

happy flashing
Cool
Ronald
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #2 on: 12/28/09, 09:01 »

Hum...
Look, Ronald... I hosted my flash movie...

Even there, it doesn't create the file, read it, and delete it...

What the hell is going on?
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #3 on: 12/28/09, 10:10 »

whre do you host it?
is it running on the local machine?
If yes, do you access the flash movieclip via localhost: ...., oder rather via filepath?
Filepath is wrong and will allways produce sandbox violations - and will never work.
Logged

happy flashing
Cool
Ronald
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #4 on: 12/28/09, 12:05 »

Yes, it is running on a local machine...
I'll post all my AS:

Code:
stop();

var TempUserID:Number = Math.round(Math.random()*999999999999)
var _TempUserID:Number = Math.round(Math.random()*99999999999);

var newURLParameter = TempUserID+'1'+_TempUserID;
var thisPage = 'http://localhost:8500/PhotoUP/dynamic/InternalProcess.cfm?RequestCod=FlashApplication';
var newPage = thisPage+'&TempUserID='+newURLParameter;

var comprimento:Number = 0;
var carregado:Number;
var total:Number;
var percent:Number = 0;
var tempFile = '';
var page = 'http://localhost:8500/PhotoUP/dynamic/TempFilesUserIDs/'+newURLParameter+'.txt';

PercentProgressLoader.text = percent+'%';
LoaderBarra.scaleX = 0;

var requisicao:URLRequest = new URLRequest(newPage+'&Action=create');
var loader:URLLoader = new URLLoader();
var loading = loader.load(requisicao);

loader.addEventListener(Event.COMPLETE,ShowData);

function ShowData(event:Event):void {
var _requisicao:URLRequest = new URLRequest(page);
var _loader:URLLoader = new URLLoader();
var _loading = loader.load(_requisicao);


_loader.addEventListener(Event.COMPLETE,_ShowData);

function _ShowData(event:Event):void {
var newLoader:URLLoader = URLLoader(event.target);
var valor = new URLVariables(newLoader.data);
trace(valor);

var Delete:URLRequest = new URLRequest(newPage+'&Action=delete');
var _Delete:URLLoader = new URLLoader();
var __Delete = loader.load(Delete);

}

}

this.addEventListener(Event.ENTER_FRAME,InitPreloader);

function InitPreloader(event:Event):void {
total = int(loaderInfo.bytesTotal / 1024);
carregado = int(loaderInfo.bytesLoaded / 1024);
percent = int(Math.floor(carregado / total * 100));
PercentProgressLoader.text = percent+'%';
LoaderBarra.scaleX = percent / 100;

if(percent==100) {
this.removeEventListener(Event.ENTER_FRAME, InitPreloader);
}

}


The files is being created... But, the error occurs while flash tries to read it. Than I can't delete the file after reading the file...
« Last Edit: 12/28/09, 13:02 by OsmarFraga » Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #5 on: 12/28/09, 12:10 »

how you open the flashfile?
You need to start with http://localhost for the flashfile as well as for the data
Logged

happy flashing
Cool
Ronald
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #6 on: 12/28/09, 12:57 »

 Huh

I didn't get your point...
All my URLs start with "http://localhost:8500/". This is from ColdFusion local machine...

If I try this directly by the browser, it works...

But by the flash, it don't...
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #7 on: 12/28/09, 13:25 »

you have to have the SWF-file inside of your localhost and open it via localhost - otherwise it is a different domain and will violate the sandbox restrictions.
Logged

happy flashing
Cool
Ronald
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #8 on: 12/28/09, 14:53 »

Ok...
Now I have the flash on my local domain.

It still doesn't work... =/

The files are being created... But flash doesn't read them and delete them...
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #9 on: 12/28/09, 15:04 »

how do you access the movieclip ?
Logged

happy flashing
Cool
Ronald
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #10 on: 12/28/09, 16:08 »

Look, which movieclip are you talking about?
Please, I think I'm starting to annoy you, so, be patience with me...  Smiley

I'm starting studying Action Script 3.  Tongue
Logged
OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #11 on: 12/28/09, 22:02 »

I have changed all my AS.

Now I have a external ActionScript file and the error occurs while I try to load it...
Look:

ActionScriptUserManipulationFile.as

Code:
var TempUserID:Number = Math.round(Math.random()*999999999999)
var _TempUserID:Number = Math.round(Math.random()*99999999999);

var newURLParameter = TempUserID+'1'+_TempUserID;
var thisPage = 'http://localhost:8500/PhotoUP/dynamic/InternalProcess.cfm?RequestCod=FlashApplication';
var newPage = thisPage+'&TempUserID='+newURLParameter;

var comprimento:Number = 0;
var carregado:Number;
var total:Number;
var percent:Number = 0;
var tempFile = '';
var page = 'http://localhost:8500/PhotoUP/dynamic/TempFilesUserIDs/'+newURLParameter+'.as';

PercentProgressLoader.text = percent+'%';
LoaderBarra.scaleX = 0;

var requisicao:URLRequest = new URLRequest(newPage+'&Action=create');
var loader:URLLoader = new URLLoader();
var loading = loader.load(requisicao);
loader.addEventListener(Event.COMPLETE,ShowData);

ActionScript layer:

Code:
#include 'ActionScriptUserManipulationFile.as'

function ShowData(e:Event):void {

function ShowData(event:Event):void {
var newLoader:URLLoader = URLLoader(event.target);
var valor = new URLVariables(newLoader.data);
HalloMsg.text=valor;

var Delete:URLRequest = new URLRequest(newPage+'&Action=delete');
var _Delete:URLLoader = new URLLoader();
var __Delete = loader.load(Delete);

}

}

this.addEventListener(Event.ENTER_FRAME,InitPreloader);

function InitPreloader(event:Event):void {
total = int(loaderInfo.bytesTotal / 1024);
carregado = int(loaderInfo.bytesLoaded / 1024);
percent = int(Math.floor(carregado / total * 100));
PercentProgressLoader.text = percent+'%';
LoaderBarra.scaleX = percent / 100;

if(percent==100) {
this.removeEventListener(Event.ENTER_FRAME, InitPreloader);
}

}

The error: "Scene 1, Layer 'actions', Frame 1, Line 1: 1093: Syntax error.".
And: Scene 1, Layer 'actions', Frame 1, Line 1: 1068: Unable to open included file: C:\ColdFusion8\wwwroot\PhotoUP\ActionScriptUserManipulationFile.as.

Why are it happening?
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #12 on: 12/29/09, 02:06 »

in the first line is no semicolon

Just answer my question - how do you start the flash file?

Is it possible for you to upload everything to a public host, so I can have a personal look?
« Last Edit: 12/29/09, 02:09 by Ronald Wernecke » Logged

happy flashing
Cool
Ronald
nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #13 on: 12/29/09, 08:25 »

I did some digging and found this.

1. the include directive no longer takes the # mark before hand, http://www.kirupa.com/forum/showthread.php?p=1943292

2. the include directive is for Flash to load those documents at Compile Time, not at Run Time. So you cannot do what you are trying to do. You have to compile the included file at Compile time when you compile the movie. If that is what you are doing, then I misunderstood.

Logged

OsmarFraga
Server what's that
*
Posts: 10


View Profile Email
« Reply #14 on: 12/29/09, 12:10 »

Thanks for the tips, nothingGrinder!  Smiley

Ronald, I hosted it...
If you want, take a look: http://www.mediafire.com/?w1odycm5nit

The as files are being created... but now, They aren't being included...
« Last Edit: 12/29/09, 12:49 by OsmarFraga » Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!