Hi,
Ok, first ill explain what im trying to do; Im trying to load .swf files with the names "1.swf,2.swf, etc..." which will be loaded in to container movieclips with the names con1,con2 -> con5. They are randomly generated and there is some code to do a nice roll over effect. The problem is that it loads the .swf clip fine, but the rollover effects dont get attatched. Is this because ive mis-understood how loadMovie(); works ? or are you supposed to use loadMovieNum to load in to a specific level and then work it from there. I have tried both solutions, and i either get the containers with the effect, or just the images without the effect. Here is the code i have so far:
var number_of_images = 9;
var speed = 5;
var alpha_standard = 50;
for (n=0; n<=5; n++) {
eval("con"+n).movienum = Math.ceil(Math.random()*number_of_images);
loadMovie("/images/portfolio/"+eval("con"+n).movienum+".swf", "con"+n);
eval("con"+n)._y = 44;
eval("con"+n)._alpha = alpha_standard;
eval("con"+n).onRollOut = function() {
this.rollover = false;
trace(this.rollover);
};
eval("con"+n).onRollOver = function() {
this.rollover = true;
trace(this.rollover);
};
con1.onEnterFrame = function() {
if (this.rollover == false) {
/*
-- alpha fading --
*/
this.alpdiff = (this._alpha-alpha_standard);
this.ualpdiff = this.alpdiff/speed;
this._alpha -= this.ualpdiff;
/*
-- width fading --
*/
this.normwidth = 76;
this.newwidth = this.normwidth+((this.normwidth/100)*20);
this.wdiff = (this._width-this.normwidth);
this.uwdiff = this.wdiff/speed;
this._width -= this.uwdiff;
/*
-- height Fading --
*/
this.normheight = 62;
this.newheight = this.normheight+((this.normheight/100)*20);
this.hdiff = (this._height-this.normheight);
this.uhdiff = this.hdiff/speed;
this._height -= this.uhdiff;
} else {
/*
-- alpha fading --
*/
this.alpdiff = (100-this._alpha);
this.ualpdiff = this.alpdiff/speed;
this._alpha += this.ualpdiff;
/*
-- width fading --
*/
this.normwidth = 76;
this.newwidth = this.normwidth+((this.normwidth/100)*20);
this.wdiff = (this.newwidth-this._width);
this.uwdiff = this.wdiff/speed;
this._width += this.uwdiff;
/*
-- height Fading --
*/
this.normheight = 62;
this.newheight = this.normheight+((this.normheight/100)*20);
this.hdiff = (this.newheight-this._height);
this.uhdiff = this.hdiff/speed;
this._height += this.uhdiff;
}
};
}
con1._x = 50;
con2._x = 181;
con3._x = 312;
con4._x = 443;
con5._x = 574;
Thanks in advance to anyone who replys
-Matt "Deviant" Lloyd