 import flash.display.LoaderInfo;
 import flash.events.Event;
 import flash.events.EventDispatcher;
+import flash.events.IOErrorEvent;
+import flash.events.SecurityErrorEvent;
 import flash.net.URLRequest;
 import flash.system.LoaderContext;
 import flash.utils.Dictionary;

    private var _enableQueueing:Boolean = false;
    
    /**
     *  Enables queuing behavior and functionality.
     * 
     *  @default false;
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10

        if (!cacheEntry || cacheEntry.value == UNTRUSTED || !enableCaching)
        {             
            // No previously cached entry or the entry is marked as
            // unshareable (untrusted), we must execute a Loader request
            // for the data.
            var loader:Loader = new Loader();
            
            // Listen for completion so we can manage our cache entry upon
            // failure or if the loaded data is deemed unshareable.
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
                loader_completeHandler, false, 0, true);
            loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 
                loader_completeHandler, false, 0, true);
            loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, 
                loader_completeHandler, false, 0, true);
            
            var urlRequest:URLRequest = source is URLRequest ? 
                source as URLRequest : new URLRequest(source as String);
            
            if (enableQueueing)
            {
                // Queue load request.
                queueRequest(urlRequest, loader, contentLoaderGrouping);
            }
            else
            {
                // Execute Loader
                var loaderContext:LoaderContext = new LoaderContext();
                loaderContext.checkPolicyFile = true;
                loader.load(urlRequest, loaderContext);
            }
            
            // Create ContentRequest instance to return to caller.
            contentRequest = new ContentRequest(this, loader.contentLoaderInfo);
            
            // Now cache our new loader info if applicable.
            if (!cacheEntry && enableCaching) 
                addCacheEntry(key, loader.contentLoaderInfo);
        }
        else
        {
