   * load-transformed views and those that aren't
   * @access private
   */
-LzMakeLoadSprite.setResource = function ( nresc ){
+LzMakeLoadSprite.setResource = function (nresc) {
     // unload anything currently loading...
     if (this.loader.mc.loading == true) {
         LzLoadQueue.unloadRequest(this.loader.mc);
     }
-    if ( nresc == "empty" ){
+    if (nresc == "empty") {
         // call shadowed setResource()
-        this.___setResource( nresc );
-    } else { 
-        if ( nresc.indexOf('http:') == 0 || nresc.indexOf('https:') == 0){
-            this.setSource( nresc );
-            return;
-        }
-        this.loader.attachLoadMovie( nresc );
-        if ( this.queuedplayaction == null ){
-            this.queuePlayAction( "checkPlayStatus" );
+        this.___setResource(nresc);
+    } else if (nresc.indexOf('http:') == 0 || nresc.indexOf('https:') == 0) {
+        this.setSource(nresc);
+    } else {
+        this.loader.attachLoadMovie(nresc);
+        if (this.queuedplayaction == null) {
+            this.queuePlayAction("checkPlayStatus");
         }
         //this.updateAfterLoad();
     }
-
-//     var mc = this.__LZmovieClipRef;
-//     Debug.debug(mc, '_width', mc._width);
-//     Debug.debug(mc, '_height', mc._height);
-//     Debug.debug(mc, '_xscale', mc._xscale);
-//     Debug.debug(mc, '_yscale', mc._yscale);
-}
-
-//handle error
-
+}
 
 /**
   * Updates movieclip properties after the resource has loaded
   * @access private
   */
-LzMakeLoadSprite.updateAfterLoad = function (ignore){
-
+LzMakeLoadSprite.updateAfterLoad = function (ignore) {
     this.isloaded = true;
+    
     var mc = this.getMCRef();
     this.resourcewidth = mc._width;
     this.resourceheight = mc._height;
-
     this.currentframe = mc._currentframe;
 
     var tfchg = this.totalframes != mc._totalframes;
-    if ( tfchg ){
+    if (tfchg) {
         this.totalframes = mc._totalframes;
         this.owner.resourceevent('totalframes', this.totalframes);
     }
 
-    if ( this.totalframes > 1 ){
+    if (this.totalframes > 1) {
         this.checkPlayStatus();
     }
 
-    this.setHeight(this.hassetheight?this.height:null);
-    this.setWidth(this.hassetwidth?this.width:null);
+    this.setHeight(this.hassetheight ? this.height : null);
+    this.setWidth(this.hassetwidth ? this.width : null);
 
     if (this.__contextmenu) {
         this.setContextMenu(this.__contextmenu);
     }
-
 
     this.owner.__LZvizLoad = true; 
     this.owner.__LZupdateShown();
     this.owner.resourceload({width: this.resourcewidth, height: this.resourceheight, resource: this.resource, skiponload: false});
-    this.owner.reevaluateSize( );   
+    this.owner.reevaluateSize();
+    
     //if (this.owner.onload) this.owner.onload.sendEvent( this.loader.mc );
-
-    //Debug.write('Sprite.updateAfterLoad', mc, this.resourcewidth, this.resourceheight, this.resource, this.owner.resource, this.owner, this.x);
-    //Debug.warn('Sprite.updateAfterLoad');
 }
 
 /**

  * Get the number of bytes loaded so far
  * @return: A number that is the maximum offset for this resource
  */
LzMakeLoadSprite.getLoadBytes = function (){
    return this.getMCRef().getBytesLoaded();
}


/**
  * @access private
  */
var LzMakeLoadSprite = {};

/**
  * Makes the given view able to load a remote resource
  */
LzMakeLoadSprite.transform = function (v, src, cache, headers, filetype) {
    for (var k in this) {
        if (k != "transform") {
            if (typeof v[k] == 'function') {
                // replace old method with _methodname to support super
                v[ '___' + k ] = v[k];
            }
            v[k] = this[k];
        }
    }

    if (v.__LZmovieClipRef == null || ! v.__LZhaser) {
        //the view doesn't have the empty resource. We need to try and replace it
        v.makeContainerResource();
    }
    
    v.createLoader(src, cache, headers, filetype);
}

/**
  * @access private
  */
LzMakeLoadSprite.createLoader = function (src, cache, headers, filetype) {
    this.loader = new LzMediaLoader(this, {});
    
    this.updateDel = new LzDelegate(this, "updateAfterLoad", this.loader, "onloaddone");
    this.errorDel = new LzDelegate(this, "__LZsendError", this.loader, "onerror");
    this.timeoutDel = new LzDelegate(this, "__LZsendTimeout", this.loader, "ontimeout");

    if (src != null) {
        this.setSource(src, cache, headers, filetype);
    }
}

/**
  * @access private
  * @param String src: The url from which to load the resource for this view.
  * @param String cache: If set, controls caching behavior. Choices are
  * "none" , "clientonly" , "serveronly" , "both" -- where both is the default.
  * @param String headers: Headers to send with the request (if any.)
  * @param String filetype: Filetype, e.g. 'mp3' or 'jpg'.  If not specified, it will be derived from the URL.
  */
LzMakeLoadSprite.setSource = function (src, cache, header, filetype) {
    if (this.loader.mc.loading == true) {
        LzLoadQueue.unloadRequest(this.loader.mc);
    }
    
    if (src == '' || src == ' ' || src == null) {
        if ($debug) Debug.error('setSource called with an empty url');
        return;
    }

    this.stopTrackPlay();
    this.isloaded = false;
    if (this.queuedplayaction == null) {
        this.queuePlayAction("checkPlayStatus");
    }

    this.resource = src;
    //this.owner.resource = src;
    //if (this.owner.onresource) this.owner.onresource.sendEvent( src );

    this.owner.__LZvizLoad = false; 
    this.owner.__LZupdateShown();
    this.loader.request(src, cache, headers, filetype);
}

/**
