Hi, if anyone knows where I’ve gone wrong here please help me out… It’s a navigation effect that follows and resizes a mc on rollovers/outs. I’ve gotten this to work before, but when i change the button width to suit the site it starts skrewing up.
The buttons are named but1, but2… here’s the AS in the main timeline:
[AS]
for (i=1; i<5; i++) {
this[“but”+i].onRollOver = function() {
tarw = this._width;
tarx = this._x;
follow(tarx, tarw);
};
}
function follow(x, w) {
slide.onEnterFrame = function() {
this._x += (x-this._x)/2;
this._width += (w-this._width)/2;
if (this._x>x-1 && this._x<x+1 && this._width>w-1 && this._width<w+1) {
delete this.onEnterFrame;
}
};
}
[/AS]
here’s a link to the fla and swf:
http://www.loftymedia.com/beta/insidex.fla
http://www.loftymedia.com/beta/insidex.swf
If there’s anything else I’ve left out that might help, then please let me know! Thanks
- R :tie: