Code works for Flash Player 6 settings but not for Flash Player 8

Hi,

I’m pretty new to Action script and I have a problem here that I can’t seem to figure out.

I have this Action Script Code which is attached to a simple movieclip, and it all works IF the general settings are set for Flash Player 6.

It does not work for Flash Player 7 or above, which is probably because this is Actions Script 1 Code…

I attached the .fla file and also here’s the code:

onClipEvent (load) {
    accel =0;
    rate = 0.05;
    trace(_y)
    _root.ykoord=0;
}

onClipEvent(enterFrame) { 
        y=y*accel+(_root.ykoord-_y) * rate;
        _y+=y;
        if(Math.abs(_root.ykoord-_y)<1) { _y=_root.ykoord; }
    
}

Do I need to change the code ?

I wanna publish in Action Script 2 for either Flash player 8 or 9.

Thanx for your help in advance !!! :wink:

Mike