Hi,
Please help me out - this site is already on the net so it is kinda embarassing that it doesn’t work
This is my problem: …well… it’s kinda hard to describe so bear with me…
Im using a resizable mc in the root of my movie to load different submovies and that works just fine. However, I needed to use different mc for a photo gallery. If you go to this site: http://www.szymonlenkowski.yes.pl,
click on > english (or polski) > folio > foto > either VARIOUS, WORK or FILMFRAMES (rozne, praca, stopklatki) > any of the thumbs…
The picture is loaded into a new movie. Now, if you want to go back to, lets say INFO, everything dissappears and the INFO is loaded… but not visible or resized…
And it is the only way that this behaviour is displayed.
I tried to solve it myself but no luck so far.
Here is the portion of the code where I found it’s missbehaving:
stop();
spacing = 10;
var plusColor =15;
myColor = new Color(containerMC);
newColor = myColor.getTransform();
newColor.rb = 255;
newColor.bb = 255;
newColor.gb = 255;
var white = 255;
myColor.setTransform(newColor);
MovieClip.prototype.loadMov = function(mov){
_root.containerMC._alpha = 0;
this.attachMovie(mov, "containerMC", 0);
_root.onEnterFrame = function(){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
trace("before resize, w: " + w + " h: " + h); //it stops after this line
border.resizeMe(w, h);
delete _root.onEnterFrame;
}
}
MovieClip.prototype.resizeMe = function(w, h){
trace("in resize"); //this is not displayed
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 += plusColor;
newColor.rb = newColor.rb - plusColor;
newColor.bb = newColor.bb - plusColor;
newColor.gb = newColor.gb - plusColor;
white = white - plusColor;
myColor.setTransform(newColor);
if (white <= plusColor - 5){
white = 255;
newColor = myColor.getTransform();
newColor.rb = 255;
newColor.bb = 255;
newColor.gb = 255;
delete this.onEnterFrame;
}
}
}
}
containerMC.loadMov("siena");
here is the trace output for the above path:
before resize, w: 545 h: 294
in resize
before resize, w: 535 h: 310
in resize
before resize, w: 710 h: 344
in resize
before resize, w: 723.95 h: 336
The .fla is more than 1.4MB so I don’t know if someone will want to check it… let me know if you do.
Please help me out - this site is already on the net so it is kinda embarassing that it doesn’t work
Thanks in advance for any help!
Maciek