Making movieclip alpha = 0 and move

I’m trying to make a movie clip move a small bit to the right and slowly (or quickly) dim until you can’t see it. I’ve tried 2 different methods. The first was my original so that once you had the mouse in the original location of the movie, you just have to keep it there, you don’t have to move the mouse with the clip. The 2nd was one i got after searching the forums.

I’ve debugged out the for statement and tried just seeing if i could make a different movie’s alpha change, and it didn’t. So I believe the problem is either in the if (of the first) or onRollOver (of the 2nd).

[AS]onClipEvent(load){
xspot = _root._xmouse;
yspot = _root._ymouse;
if((xspot >= 41.3) && (xspot_xmouse <= 76) && (yspot >= 2.6) && (yspot <= 20)){
for(i=0; i <= 100; i++){
email._alpha = (100 - i);
email._x = (41.3 - (i / 10));
}
}
}[/AS]

[AS]onClipEvent(load){
email.onRollOver = function() {
for(i=0; i <= 100; i++){
email._alpha = (100 - i);
email._x = (41.3 + (i / 6));
}
}
}[/AS]

Thanks,
NWC :trout:

The for loop is executed in 1 frame, so you don’t see the fade. You have to put it in an EnterFrame. Which version of Flash are you using?

i’m using MX. I tried using onClipEvent(enterFrame), but it still didn’t work with that.

you mean like this?

cool. That’s what I was trying to do. Thanks zylum.

no problem :slight_smile: