PDA

View Full Version : ??what am I doing wrong??


armeggedon
12-07-2002, 02:09 AM
I am trying to write code that when passed over the movie clip the clip will slowly rise to a specific size and when I use this code it just jumps to the size and jumps back do I need to invoke a timer or somthing. I am very new and am acustomed to VB so I just need to get the commands down, any help would be great thanks...

on (rollOver) {
x=_height;
y=_height;
do {
_height++;
_width++;
x+=10;
} while (x<2*_height);
}
on (rollOut) {
do {
_height--;
_width--;
x-=10
} while (x>=y);
}

xxlm
12-07-2002, 08:06 AM
on (rollOver) {
x=this._height;
y=this._height;
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (x<2*this._height) {
this._height++;
this._width++;
x+=10;
} else {
delete this.onEnterFrame;
}
}
}

on (rollOut) {
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (x>=y) {
this._height--;
this._width--;
x-=10
} else {
delete this.onEnterFrame;
}
}
}

;)