Simple Actionscripting Help/Problem

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 :stuck_out_tongue:

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);

Thank you a ton :slight_smile: 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!!!