Flaevo
April 1, 2006, 6:59am
1
I’m trying to call a function that will slowly move/fade an object and it doesn’t seem to want to work.
Here is the code can someone possibly tell me what I’m doing wrong sorry im sort of new but im fluent in php soo I can’t get this
mypos = 1;
position = function () {
mypos++;
setProperty(this.mybox, _alpha, mypos);
}
setInterval(position, 1000);
Thanks in advance!
I’m trying to call a function that will slowly move/fade an object and it doesn’t seem to want to work.
Here is the code can someone possibly tell me what I’m doing wrong sorry im sort of new but im fluent in php soo I can’t get this
mypos = 1;
position = function () {
mypos++;
setProperty(this.mybox, _alpha, mypos);
}
setInterval(position, 1000);
Thanks in advance!
maybe something like this
mypos = 1;
mybox._alpha = 0;
position = function () {
mybox._alpha++;
mybox._x += mypos;
if (mybox._alpha>=100 && mybox._x>100) {
mybox._alpha = 100;
mybox._x = 50;
clearInterval(mi);
}
};
mi = setInterval(position, 100);
Flaevo
April 1, 2006, 7:37am
3
Thank you a ton I think it had to do with the clear interval and the loop… I shoulda known better this will allow me to do everything I’ve been needin to do
Thanks a ton!!!