Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
So, note that monitor.reset() now does a facade.removeProxy for SRP objects. If this is a problem for anybody, please let me know.
This method offers an alternative to that, as a shortcut for the client app, whereby the app does not have to create the StartupResourceProxy (sup) object for the IStartupProxy object. Instead, the StartupManager (SM) will create the sup object. But note that the app does not then have a reference to it and has not given it a name and has not registered it using registerProxy(). In fact, the SM will not give it a name and hence will not register it. This is fine as regards the SM operations.
public function addResourceViaStartupProxy( px :IStartupProxy ) :void { var name : String = ( px as AssetProxy ).url ; facade.registerProxy( new StartupResourceProxy( name, px ) ); var r :StartupResourceProxy = facade.retrieveProxy( name ) as StartupResourceProxy; //var r :StartupResourceProxy = new StartupResourceProxy( "", px ); addResource( r ); }
/** * See addResource() above. This method offers an alternative to that, as a shortcut for the * client app, whereby the app does not have to create the StartupResourceProxy (srp) object for the * IStartupProxy object. Instead, the StartupManager (SM) will create and register the srp object, * naming it as follows * <ul><li> * use the name supplied as the second, optional argument; if supplied</li> * <li>otherwise, create a name by prefixing a suitable string to the name of the given * IStartupProxy object; the prefix is specified in the var <code>prefixIfAutoSRPName</code>, which * has an initial value that should usually suffice for uniqueness * i.e. const StartupManager.PREFIX_IF_AUTO_SRP_NAME i.e. "smSR_"</li> * </ul> * This shortcut is probably attractive only if there are no dependencies between the resources, * because the app requires references to the srp objects, to express the dependencies. */ public function addResourceViaStartupProxy( px :IStartupProxy, resourceProxyName :String = null ) :void {
exponential backoff A strategy for reducing the load on the system and increasing the likelihood of repeated requests succeeding by incrementally decreasing the rate at which retries are executed. For example, client applications might wait up to 400 milliseconds before attempting the first retry, up to 1600 milliseconds before the second, up to 6400 milliseconds (6.4 seconds) before the third, and so on.
Any chance that support for mp3s could be added to the next release?
Also, is the asset loader intended to work in flash?
import mx.collections.ListCollectionView; import org.puremvc.as3.utilities.startupmanager.model.RetryParameters; import org.puremvc.as3.demos.flex.startupasordered.ApplicationFacade; private var facade:ApplicationFacade = ApplicationFacade.getInstance(); public static const RETRY :String = "retry"; public static const LOAD :String = "load"; public static const TRY_TO_COMPLETE :String = "tryToComplete"; [Bindable] public var customerStatus :String = ""; [Bindable] public var productStatus :String = ""; [Bindable] public var salesOrderStatus :String = ""; [Bindable] public var debtorAccountStatus :String = ""; [Bindable] public var invoiceStatus :String = ""; [Bindable] public var overallStatus :String = "..."; [Bindable] public var notifications :ListCollectionView; [Bindable] public var retryIsVisible :Boolean = false; [Bindable] public var retryIsEnabled :Boolean = false; public var retryParameters :RetryParameters = new RetryParameters(); [Bindable] public var paramsEntryIsEnabled :Boolean = true; [Bindable] public var mode :int =1; [Bindable] private var initialMaxRetries :int = retryParameters.maxRetries; [Bindable] private var initialRetryInterval :Number = retryParameters.retryInterval; [Bindable] private var initialTimeout :Number = retryParameters.timeout; private function goLoad() :void { updateRetryParameters(); if (mode == 1) sendEvent( LOAD ); else sendEvent( TRY_TO_COMPLETE ); } private function sendEvent( eventName :String ) :void { dispatchEvent( new Event( eventName )); } private function updateRetryParameters() :void { retryParameters = new RetryParameters( maxRetries.value, retryInterval.value, timeout.value ); }