IOErrorEvent - URL not found

45 views
Skip to first unread message

FlashDash

unread,
May 26, 2013, 1:46:28 PM5/26/13
to bulkload...@googlegroups.com
Hi

I'm using BulkLoader to download multiple .swf files from a remote URL. Most of the time it works fine. However, every so often I get the following message: (note: the list of .swfs to download doesn't change)

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

My application seems to continue without any problems, and all .swfs still appear to be downloaded and displayed. I guess it's just connection blips.

Very rarely, I get several of these error messages in a row, and my application crashes with a null exception. I'm guessing that it tries to load the particular .swf several times, fails and continues onwards thinking the .swf has downloaded correctly?

I've tried adding event listeners on each individual LoadingItem and the bulkloader itself, but they don't seem to be catching the IOErrorEvent.




Artur Poniedziałek

unread,
May 26, 2013, 1:53:46 PM5/26/13
to bulkload...@googlegroups.com

Hi,

As you wrote:

"#2035: URL Not Found."

probably url addresses to the files you want to download are invalid.

Here someone had the same problem:

http://stackoverflow.com/questions/2165852/as3-error-error-2044-unhandled-ioerrorevent-text-error-2036-load-never-c




W dniu 2013-05-26 19:46, FlashDash pisze:
> --
> You received this message because you are subscribed to the Google
> Groups "BulkLoader users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bulkloader-use...@googlegroups.com.
> To post to this group, send email to bulkload...@googlegroups.com.
> Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

James Wozniak

unread,
May 26, 2013, 2:12:08 PM5/26/13
to bulkload...@googlegroups.com
Hi thanks for the reply.

Is there a way of finding out the specific URL that failed? The thing is, the URL list is the same every time and it often does work without any of these errors thrown. I guess maybe there could be a problem with the platform on which the .swfs are hosted.

It's going to be a problem though if my application crashes as a result. I'll try to post an error trace if I can produce the crash again


On Sun, May 26, 2013 at 6:53 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:

Hi,

As you wrote:

"#2035: URL Not Found."

probably url addresses to the files you want to download are invalid.

Here someone had the same problem:

http://stackoverflow.com/questions/2165852/as3-error-error-2044-unhandled-ioerrorevent-text-error-2036-load-never-c




W dniu 2013-05-26 19:46, FlashDash pisze:
Hi

I'm using BulkLoader to download multiple .swf files from a remote URL. Most of the time it works fine. However, every so often I get the following message: (note: the list of .swfs to download doesn't change)

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

My application seems to continue without any problems, and all .swfs still appear to be downloaded and displayed. I guess it's just connection blips.

Very rarely, I get several of these error messages in a row, and my application crashes with a null exception. I'm guessing that it tries to load the particular .swf several times, fails and continues onwards thinking the .swf has downloaded correctly?

I've tried adding event listeners on each individual LoadingItem and the bulkloader itself, but they don't seem to be catching the IOErrorEvent.




--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-users+unsubscribe@googlegroups.com.

To post to this group, send email to bulkloader-users@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "BulkLoader users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bulkloader-users/u5ZiZRwbN-Q/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to bulkloader-users+unsubscribe@googlegroups.com.
To post to this group, send email to bulkloader-users@googlegroups.com.

Artur Poniedziałek

unread,
May 26, 2013, 2:15:43 PM5/26/13
to bulkload...@googlegroups.com

Hi,

write sample code how you attach the files to be downloaded,
how to you trying to get files when they are downloaded,
and sample code when you control progress and complete events.




W dniu 2013-05-26 20:12, James Wozniak pisze:
Hi thanks for the reply.

Is there a way of finding out the specific URL that failed? The thing is, the URL list is the same every time and it often does work without any of these errors thrown. I guess maybe there could be a problem with the platform on which the .swfs are hosted.

It's going to be a problem though if my application crashes as a result. I'll try to post an error trace if I can produce the crash again
On Sun, May 26, 2013 at 6:53 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:

Hi,

As you wrote:

"#2035: URL Not Found."

probably url addresses to the files you want to download are invalid.

Here someone had the same problem:

http://stackoverflow.com/questions/2165852/as3-error-error-2044-unhandled-ioerrorevent-text-error-2036-load-never-c




W dniu 2013-05-26 19:46, FlashDash pisze:
Hi

I'm using BulkLoader to download multiple .swf files from a remote URL. Most of the time it works fine. However, every so often I get the following message: (note: the list of .swfs to download doesn't change)

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

My application seems to continue without any problems, and all .swfs still appear to be downloaded and displayed. I guess it's just connection blips.

Very rarely, I get several of these error messages in a row, and my application crashes with a null exception. I'm guessing that it tries to load the particular .swf several times, fails and continues onwards thinking the .swf has downloaded correctly?

I've tried adding event listeners on each individual LoadingItem and the bulkloader itself, but they don't seem to be catching the IOErrorEvent.




--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.

To post to this group, send email to bulkload...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "BulkLoader users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bulkloader-users/u5ZiZRwbN-Q/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.

James Wozniak

unread,
May 26, 2013, 2:41:22 PM5/26/13
to bulkload...@googlegroups.com
Hi, if you let this code run for a while, it should produce the IOErrorEvent. Looking at it, I'm fairly sure it's a problem with pagodabox hosting.

public class Main extends Sprite 
{
public function Main():void 
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
public var bulkLoader:BulkLoader;
private function init(e:Event = null):void 
{
removeEventListener(Event.ADDED_TO_STAGE, init);
reload();
}
private function reload():void
{
bulkLoader = new BulkLoader();
bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
bulkLoader.addEventListener(Event.COMPLETE, onComplete);
bulkLoader.start();
}
private function onComplete(e:Event):void
{
var mc:MovieClip = bulkLoader.getMovieClip("id", true);
//mc.x = 300;
//mc.y = 400;
//this.addChild(mc);
trace("loaded");
reload();

Artur Poniedziałek

unread,
May 26, 2013, 3:10:51 PM5/26/13
to bulkload...@googlegroups.com
Hi James,

probably problem is with your reload function.
Every time you call the function you create new instance of BulkLoader object and probably
you lose reference to downloaded object(s).

Lets try to use static access to BulkLoader object like below:

private function reload()
{

            var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
                           
            if ( local_loader == null)
            {
                local_loader = new BulkLoader("String_Name_For_Your_BulkLoader_Object");
            }                   
           
           local_loader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
           local_loader.addEventListener(Event.COMPLETE, onComplete); // remember that you should remove the event in your complete function
local_loader.start();
        
           
}

and in your complete function:


private function onComplete(e:Event):void
{

        var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
                           
        if ( local_loader != null)
        {
                var mc:MovieClip = local_loader.getMovieClip("id", true); // or  var mc:MovieClip = MovieClip( local_loader.getContent("id") ) ;

                //mc.x = 300;
                //mc.y = 400;
                //this.addChild(mc);
                trace("loaded");
                reload();

        }

}

W dniu 2013-05-26 20:41, James Wozniak pisze:

James Wozniak

unread,
May 26, 2013, 3:32:32 PM5/26/13
to bulkload...@googlegroups.com
Hi,

Thanks for the suggestion. Unfortunately I still get the URL not found error with the static approach

Artur Poniedziałek

unread,
May 26, 2013, 4:01:57 PM5/26/13
to bulkload...@googlegroups.com

Let's try to change this line:


bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});

Probably the problem is with "id". You should use different id for every call of reload function and remember in
global variable the name of the last "id".


W dniu 2013-05-26 21:32, James Wozniak pisze:
Hi,

Thanks for the suggestion. Unfortunately I still get the URL not found error with the static approach
On Sun, May 26, 2013 at 8:10 PM, Artur Poniedzia�ek <arturpon...@gmail.com> wrote:
Hi James,

probably problem is with your reload function.
Every time you call the function you create new instance of BulkLoader object and probably
you lose reference to downloaded object(s).

Lets try to use static access to BulkLoader object like below:

private function reload()
{

����������� var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
��� ��� ��� ��� ��� ��� ���
��� ��� ��� if ( local_loader == null)
��� ��� ��� {
��� ��� ��� ��� local_loader = new BulkLoader("String_Name_For_Your_BulkLoader_Object");
��� ��� ��� }��� ��� ��� ��� ���
��� ��� ���
���������� local_loader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
�����������local_loader.addEventListener(Event.COMPLETE, onComplete); // remember that you should remove the event in your complete function
local_loader.start();
���� ���
��� ��� ���
}

and in your complete function:


private function onComplete(e:Event):void
{

��� ��� var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
��� ��� ��� ��� ��� ��� ���
��� ��� if ( local_loader != null)
��� ��� {
��� ��� ��� ��� var mc:MovieClip = local_loader.getMovieClip("id", true); // or� var mc:MovieClip = MovieClip( local_loader.getContent("id") ) ;

��� ��� ��� ��� //mc.x = 300;
��� ��� ��� ��� //mc.y = 400;
��� ��� ��� ��� //this.addChild(mc);
��� �� �� ��� � trace("loaded");
��� ��� ��� ��� reload();

��� ��� }

}

W dniu 2013-05-26 20:41, James Wozniak pisze:
Hi, if you let this code run for a while, it should produce the IOErrorEvent. Looking at it, I'm fairly sure it's a problem with pagodabox hosting.

public class Main extends Spriteďż˝
{
public function Main():voidďż˝
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
public var bulkLoader:BulkLoader;
private function init(e:Event = null):voidďż˝
{
removeEventListener(Event.ADDED_TO_STAGE, init);
reload();
}
private function reload():void
{
bulkLoader = new BulkLoader();
bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
bulkLoader.addEventListener(Event.COMPLETE, onComplete);
bulkLoader.start();
}
private function onComplete(e:Event):void
{
var mc:MovieClip = bulkLoader.getMovieClip("id", true);
//mc.x = 300;
//mc.y = 400;
//this.addChild(mc);
trace("loaded");
reload();
}

}
On Sunday, May 26, 2013 7:15:43 PM UTC+1, futurox wrote:

Hi,

write sample code how you attach the files to be downloaded,
how to you trying to get files when they are downloaded,
and sample code when you control progress and complete events.




W dniu 2013-05-26 20:12, James Wozniak pisze:
Hi thanks for the reply.

Is there a way of finding out the specific URL that failed? The thing is, the URL list is the same�every time�and it often does work without any of these errors thrown. I guess maybe there could be a problem with the platform on which the .swfs are hosted.
ďż˝
ďż˝

--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.

To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

--
You received this message because you are subscribed to a topic in the Google Groups "BulkLoader users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bulkloader-users/u5ZiZRwbN-Q/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

James Wozniak

unread,
May 26, 2013, 4:10:06 PM5/26/13
to bulkload...@googlegroups.com
Hi, just tried it but I'm afraid it didn't make a difference.


On Sun, May 26, 2013 at 9:01 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:

Let's try to change this line:


bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});

Probably the problem is with "id". You should use different id for every call of reload function and remember in
global variable the name of the last "id".


W dniu 2013-05-26 21:32, James Wozniak pisze:
Hi,

Thanks for the suggestion. Unfortunately I still get the URL not found error with the static approach
On Sun, May 26, 2013 at 8:10 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:
Hi James,

probably problem is with your reload function.
Every time you call the function you create new instance of BulkLoader object and probably
you lose reference to downloaded object(s).

Lets try to use static access to BulkLoader object like below:

private function reload()
{

            var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
                           
            if ( local_loader == null)
            {

                local_loader = new BulkLoader("String_Name_For_Your_BulkLoader_Object");
            }                   
           
           local_loader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
           local_loader.addEventListener(Event.COMPLETE, onComplete); // remember that you should remove the event in your complete function
local_loader.start();
        
           
}

and in your complete function:


private function onComplete(e:Event):void
{

        var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
                           
        if ( local_loader != null)
        {
                var mc:MovieClip = local_loader.getMovieClip("id", true); // or  var mc:MovieClip = MovieClip( local_loader.getContent("id") ) ;

                //mc.x = 300;
                //mc.y = 400;
                //this.addChild(mc);
                trace("loaded");
                reload();

        }

}

W dniu 2013-05-26 20:41, James Wozniak pisze:
Hi, if you let this code run for a while, it should produce the IOErrorEvent. Looking at it, I'm fairly sure it's a problem with pagodabox hosting.

public class Main extends Sprite 
{
public function Main():void 
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
public var bulkLoader:BulkLoader;
private function init(e:Event = null):void 
{
removeEventListener(Event.ADDED_TO_STAGE, init);
reload();
}
private function reload():void
{
bulkLoader = new BulkLoader();
bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
bulkLoader.addEventListener(Event.COMPLETE, onComplete);
bulkLoader.start();
}
private function onComplete(e:Event):void
{
var mc:MovieClip = bulkLoader.getMovieClip("id", true);
//mc.x = 300;
//mc.y = 400;
//this.addChild(mc);
trace("loaded");
reload();
}

}
On Sunday, May 26, 2013 7:15:43 PM UTC+1, futurox wrote:

Hi,

write sample code how you attach the files to be downloaded,
how to you trying to get files when they are downloaded,
and sample code when you control progress and complete events.




W dniu 2013-05-26 20:12, James Wozniak pisze:
Hi thanks for the reply.

Is there a way of finding out the specific URL that failed? The thing is, the URL list is the same every time and it often does work without any of these errors thrown. I guess maybe there could be a problem with the platform on which the .swfs are hosted.

Artur Poniedziałek

unread,
May 26, 2013, 4:23:33 PM5/26/13
to bulkload...@googlegroups.com

So, maybe the problem is with SweaterRed.swf ?
I loaded it into Firefox and it looks like it was something wrong.


W dniu 2013-05-26 22:10, James Wozniak pisze:
Hi, just tried it but I'm afraid it didn't make a difference.
On Sun, May 26, 2013 at 9:01 PM, Artur Poniedzia�ek <arturpon...@gmail.com> wrote:

Let's try to change this line:


bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});

Probably the problem is with "id". You should use different id for every call of reload function and remember in
global variable the name of the last "id".


W dniu 2013-05-26 21:32, James Wozniak pisze:
Hi,

Thanks for the suggestion. Unfortunately I still get the URL not found error with the static approach
On Sun, May 26, 2013 at 8:10 PM, Artur Poniedzia�ek <arturpon...@gmail.com> wrote:
Hi James,

probably problem is with your reload function.
Every time you call the function you create new instance of BulkLoader object and probably
you lose reference to downloaded object(s).

Lets try to use static access to BulkLoader object like below:

private function reload()
{

����������� var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
��� ��� ��� ��� ��� ��� ���
��� ��� ��� if ( local_loader == null)

��� ��� ��� {
��� ��� ��� ��� local_loader = new BulkLoader("String_Name_For_Your_BulkLoader_Object");
��� ��� ��� }��� ��� ��� ��� ���
��� ��� ���
���������� local_loader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
�����������local_loader.addEventListener(Event.COMPLETE, onComplete); // remember that you should remove the event in your complete function
local_loader.start();
���� ���
��� ��� ���
}

and in your complete function:


private function onComplete(e:Event):void
{

��� ��� var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");

��� ��� ��� ��� ��� ��� ���
��� ��� if ( local_loader != null)

��� ��� {
��� ��� ��� ��� var mc:MovieClip = local_loader.getMovieClip("id", true); // or� var mc:MovieClip = MovieClip( local_loader.getContent("id") ) ;

��� ��� ��� ��� //mc.x = 300;
��� ��� ��� ��� //mc.y = 400;
��� ��� ��� ��� //this.addChild(mc);
��� �� �� ��� � trace("loaded");
��� ��� ��� ��� reload();

��� ��� }

}

W dniu 2013-05-26 20:41, James Wozniak pisze:
Hi, if you let this code run for a while, it should produce the IOErrorEvent. Looking at it, I'm fairly sure it's a problem with pagodabox hosting.

public class Main extends Spriteďż˝
{
public function Main():voidďż˝
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
public var bulkLoader:BulkLoader;
private function init(e:Event = null):voidďż˝
{
removeEventListener(Event.ADDED_TO_STAGE, init);
reload();
}
private function reload():void
{
bulkLoader = new BulkLoader();
bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
bulkLoader.addEventListener(Event.COMPLETE, onComplete);
bulkLoader.start();
}
private function onComplete(e:Event):void
{
var mc:MovieClip = bulkLoader.getMovieClip("id", true);
//mc.x = 300;
//mc.y = 400;
//this.addChild(mc);
trace("loaded");
reload();
}

}
On Sunday, May 26, 2013 7:15:43 PM UTC+1, futurox wrote:

Hi,

write sample code how you attach the files to be downloaded,
how to you trying to get files when they are downloaded,
and sample code when you control progress and complete events.




W dniu 2013-05-26 20:12, James Wozniak pisze:
Hi thanks for the reply.

Is there a way of finding out the specific URL that failed? The thing is, the URL list is the same�every time�and it often does work without any of these errors thrown. I guess maybe there could be a problem with the platform on which the .swfs are hosted.
ďż˝
ďż˝

--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.

To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

--
You received this message because you are subscribed to a topic in the Google Groups "BulkLoader users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bulkloader-users/u5ZiZRwbN-Q/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

--
You received this message because you are subscribed to a topic in the Google Groups "BulkLoader users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bulkloader-users/u5ZiZRwbN-Q/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

--
You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bulkloader-use...@googlegroups.com.
To post to this group, send email to bulkload...@googlegroups.com.
Visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
ďż˝
ďż˝

James Wozniak

unread,
May 26, 2013, 4:38:38 PM5/26/13
to bulkload...@googlegroups.com
I actually tried switching from loading a .swf to a small html page and the problem no longer persists. I did try another random .swf and I still had the same problem. It seems the error is thrown whilst trying to grab a movie clip from the bulkLoader.


On Sun, May 26, 2013 at 9:23 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:

So, maybe the problem is with SweaterRed.swf ?
I loaded it into Firefox and it looks like it was something wrong.


W dniu 2013-05-26 22:10, James Wozniak pisze:
Hi, just tried it but I'm afraid it didn't make a difference.
On Sun, May 26, 2013 at 9:01 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:

Let's try to change this line:


bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});

Probably the problem is with "id". You should use different id for every call of reload function and remember in
global variable the name of the last "id".


W dniu 2013-05-26 21:32, James Wozniak pisze:
Hi,

Thanks for the suggestion. Unfortunately I still get the URL not found error with the static approach
On Sun, May 26, 2013 at 8:10 PM, Artur Poniedziałek <arturpon...@gmail.com> wrote:
Hi James,

probably problem is with your reload function.
Every time you call the function you create new instance of BulkLoader object and probably
you lose reference to downloaded object(s).

Lets try to use static access to BulkLoader object like below:

private function reload()
{

            var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
                           
            if ( local_loader == null)
            {

                local_loader = new BulkLoader("String_Name_For_Your_BulkLoader_Object");
            }                   
           
           local_loader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
           local_loader.addEventListener(Event.COMPLETE, onComplete); // remember that you should remove the event in your complete function
local_loader.start();
        
           
}

and in your complete function:


private function onComplete(e:Event):void
{

        var local_loader : BulkLoader = BulkLoader.getLoader("String_Name_For_Your_BulkLoader_Object");
                           
        if ( local_loader != null)
        {
                var mc:MovieClip = local_loader.getMovieClip("id", true); // or  var mc:MovieClip = MovieClip( local_loader.getContent("id") ) ;

                //mc.x = 300;
                //mc.y = 400;
                //this.addChild(mc);
                trace("loaded");
                reload();

        }

}

W dniu 2013-05-26 20:41, James Wozniak pisze:
Hi, if you let this code run for a while, it should produce the IOErrorEvent. Looking at it, I'm fairly sure it's a problem with pagodabox hosting.

public class Main extends Sprite 
{
public function Main():void 
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
public var bulkLoader:BulkLoader;
private function init(e:Event = null):void 
{
removeEventListener(Event.ADDED_TO_STAGE, init);
reload();
}
private function reload():void
{
bulkLoader = new BulkLoader();
bulkLoader.add("http://rarebreed.pagodabox.com/SweaterRed.swf", {id:"id", preventCache:true});
bulkLoader.addEventListener(Event.COMPLETE, onComplete);
bulkLoader.start();
}
private function onComplete(e:Event):void
{
var mc:MovieClip = bulkLoader.getMovieClip("id", true);
//mc.x = 300;
//mc.y = 400;
//this.addChild(mc);
trace("loaded");
reload();
}

}
On Sunday, May 26, 2013 7:15:43 PM UTC+1, futurox wrote:

Hi,

write sample code how you attach the files to be downloaded,
how to you trying to get files when they are downloaded,
and sample code when you control progress and complete events.




W dniu 2013-05-26 20:12, James Wozniak pisze:
Hi thanks for the reply.

Is there a way of finding out the specific URL that failed? The thing is, the URL list is the same every time and it often does work without any of these errors thrown. I guess maybe there could be a problem with the platform on which the .swfs are hosted.

James Wozniak

unread,
May 26, 2013, 5:48:59 PM5/26/13
to bulkload...@googlegroups.com
Not sure what version of BulkLoader I was using as I downloaded it in .swc format a while ago. Anyway, I downloaded the latest source and it now works fine. What a waste of time! sorry

Thanks so much for the help Artur

James Wozniak

unread,
May 31, 2013, 4:07:52 PM5/31/13
to bulkload...@googlegroups.com
Actually, the problem has returned today. I'm still getting occasional 'URL not found' messages it would seem. I've done some further tests and determined that the IOErrorEvent is thrown when trying to retrieve the content from the bulkLoader instance. For example, during the call 'bulkloader.getMovieClip(...)' or even during a call to removeAll(...) 

This code can be run for a while with no errors:

                private var bulkLoader:BulkLoader = new BulkLoader("Test");

private function reload():void
{
bulkLoader.add("MY_SWF_URL", {preventCache:true} );

bulkLoader.addEventListener(Event.COMPLETE, onComplete);
bulkLoader.start();
}

private function onComplete(e:Event):void
{
reload();
}

If I add this code, it gives unhandled IOErrorEvent messages after a few minutes

   private function onComplete(e:Event):void
{
                        bulkloader.removeAll();
reload();
}       



Artur Poniedziałek

unread,
May 31, 2013, 4:11:16 PM5/31/13
to bulkload...@googlegroups.com
Have tried to debug function call:

bulkloader.removeAll();

?

W dniu 2013-05-31 22:07, James Wozniak pisze:

James Wozniak

unread,
May 31, 2013, 4:38:31 PM5/31/13
to bulkload...@googlegroups.com
It appears to be something in the ImageItem class. Specifically these lines

override public function destroy():void
{
.....
            // this is an player 10 only feature. as such we must check it's existence
            // with the array acessor, or else the compiler will barf on player 9
            if (loader && loader.hasOwnProperty("unloadAndStop") && loader["unloadAndStop"] is Function) {
                loader["unloadAndStop"](true);
            }else if (loader && loader.hasOwnProperty("unload") && loader["unload"] is Function) {
                // this is an air only feature. as such we must check it's existence
                // with the array acessor, or else the compiler will barf on non air projects
                loader["unload"]();
            }
.....

guard...@gmail.com

unread,
Feb 10, 2014, 7:54:59 AM2/10/14
to bulkload...@googlegroups.com
Dunno if it helps someone, but I ended up binding additional listener for IOErrorEvent on LoaderInfo inside ImageItem class's destroy() function. Now that function looks like this:

override public function destroy() : void{
            stop();
            cleanListeners();
            _content = null;
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void { 
        trace("ImageItem.destroy() produced IOErrorEvent " + e.text);
    } );
            // this is an player 10 only feature. as such we must check it's existence
            // with the array acessor, or else the compiler will barf on player 9
if (loader && loader.hasOwnProperty("unloadAndStop") && loader["unloadAndStop"] is Function) {
loader["unloadAndStop"](true);
}else if (loader && loader.hasOwnProperty("unload") && loader["unload"] is Function) {
// this is an air only feature. as such we must check it's existence
// with the array acessor, or else the compiler will barf on non air projects
loader["unload"]();
}
            loader = null;
        }

It silences the error and since everything is working okay if you would skip that error anyway, I don't think that it is illegal to do so.
Reply all
Reply to author
Forward
0 new messages