A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: my resize gallery not working :(

  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    33

    my resize gallery not working :(

    I've got a rezise gallery, and i have just uploaded it to test it...but it doesnt work!!! on my PC it works a charm, really nice. but uploaded, nothing...
    check it out here

    www.medisan.remikstudios.com
    its the 3rd button..and this is the code of the gallery..the buttons have this code to load the pics:

    on(release){
    containerMC.loadPic("f007.jpg");
    }


    Code:
    spacing = 10;
    containerMC._alpha = 0;
    
    MovieClip.prototype.loadPic = function(pic){
    	_root.containerMC._alpha = 0;
    	this.loadMovie(pic);
    	_root.onEnterFrame = function(){
    		var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
    		if (t != 0 && Math.round(l/t) == 1){
    			var w = containerMC._width + spacing, h = containerMC._height + spacing;
    			border.resizeMe(w, h);
    			delete _root.onEnterFrame;
    		}
    	}
    };
    MovieClip.prototype.resizeMe = function(w, h){
    	var speed = 3;
    	this.onEnterFrame = function(){
    		this._width += (w - this._width)/speed;
    		this._height += (h - this._height)/speed;
    		if( Math.abs(this._width-w)<1){
    			this._width = w;
    			this._height = h;
    			_root.containerMC._x = this._x - this._width/2 + spacing/2;
    			_root.containerMC._y = this._y - this._height/2 + spacing/2;
    			_root.containerMC._alpha = 100;
    			delete this.onEnterFrame;
    		}
    	}
    };

  2. #2
    Inspector General
    Join Date
    May 2001
    Posts
    493
    it worked for me...???

    some of the images seemed to load in the wrong place initially but then clicking the thumbnail again put them in the right place.

    make sure the registration point of your "container" clip is the upperleft corner and not the center.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center