Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: [1]
1  PureMVC Manifold / Demos and Utils / Re: Loadup - A PureMVC AS3 Utility on: August 03, 2011, 03:36:56
Hi Philip,

I did see the option to keep the resourcelist open. But this creates a problem when aborting the load. Lets say you load 3 assets. Asset 1 is loading. By starting asset 2 you flag the monitor that asset 1 is no longer required. Then you start loading asset 3. Now when asset 1 or 2 completes it sees the abort flag and aborts the load for only one of the two. You can't distinguish the requests to cancel from the ones not to. Or am I missing something?

Another thing is that an open resource list never sends loadcomplete notifications until you specifically close it. That's kind of unhandy for possible loader-views who respond to those notifications. This could be worked around by using only the progress notifications. If that's the only option.

Sander
2  PureMVC Manifold / Demos and Utils / Re: Loadup - A PureMVC AS3 Utility on: July 27, 2011, 09:20:38
Hi Philip,

This is clear now, thanks for explaining.

There is one more thing where I could use your advise.

Let's say Asset 1 has started loading and I want to start loading Asset 2 with the same loadupmonitor and assetgroupproxy. How would I accomplish that?

I can not wait for Asset 1 to send a 'complete' or 'finished incomplete' notification. I want to discard everything that has anything to do with Asset 1.

Is this at all possible? Or do I need unique loadupmonitors / assetgroupproxies?

Thanks again, Sander

Edit:
I realise that Loader.close() isn't implemented in Loadup. Is there a specific reason for that?
3  PureMVC Manifold / Demos and Utils / Re: Loadup - A PureMVC AS3 Utility on: July 13, 2011, 03:11:19
Hi Philip,

Thanks, it works. But i'm not sure if i interpreted everything ok.
I expanded the AssetProxy's loadingComplete function as following:

:
public function loadingComplete( loadedData :Object ) :void {
    loaded = true;
    assetData = loadedData;
    loadingErrorMessage = "";

    if(facade.hasProxy(assetGroupProxy.getLUMonitorProxyName() + "_HELPER"))
    {
var helperProxy:IProxy = facade.retrieveProxy(assetGroupProxy.getLUMonitorProxyName() + "_HELPER") as IProxy
if(helperProxy.getData())
{
    doSendNotification( Loadup.ASSET_LOAD_FAILED, getProxyName() );
}
    }
    else
    {
doSendNotification( Loadup.NEW_ASSET_AVAILABLE, asset );
assetGroupProxy.loadingProgress( this, /* force report */ true );
doSendNotification( Loadup.ASSET_LOADED, getProxyName() );
    }
}

Is this the way to go?

And maybe if I explain the situation in my application more clearly you could give some more suggestions.

I have a mediator wich starts loading 2 swf's. The load is initiated by a click on a chapterbutton.
There are multiple chapters and the user is able to switch between them.
If the user clicks chapter 1, two swf's start loading.
If the user clicks chapter 2 while the two swf's have not yet finished loading, it should cancel the first two and start loading those of chapter 2.

I hope this is understandable :)

Thnx, Sander


4  PureMVC Manifold / Demos and Utils / Re: Loadup - A PureMVC AS3 Utility on: July 06, 2011, 04:57:01
Hi Philip,

It has been a while since i worked with this utility. But i want to come back to my previous question.

You pointed out the following:
* if, after starting the load via the loadResources() call, you decide that you no longer want the resources, you could simply discard the response messages as they return to you, and send a 'load failed' notification for each such response, including a 'do not retry' instruction; the objective of such failed notifications is to move loadup to the 'finished incomplete' state as soon as possible.

How would that fit in the new Loadup situation?

Can you give me an example of how to discard the response messages and send a load failed notification?
This happends in the mediator who initiated the loading right?

Thanks in advance, Sander
5  PureMVC Manifold / Demos and Utils / Re: Loadup - A PureMVC AS3 Utility on: June 14, 2010, 02:27:41
Hi Philip,

Thanks, the 3rd suggestion should be the way to go in my case.
6  PureMVC Manifold / Demos and Utils / Re: Loadup - A PureMVC AS3 Utility on: June 09, 2010, 04:26:19
Hi Phillip,

Is there a way to cancel an active loading sequence?

Thnx in advance,
Sander
Pages: [1]