Объявляйте функцию на новой строке.

Код AS1/AS2:
rotate=0;//this variable will rotate the lines
number=0;//this variable will give a limit to the number of lines
this.onEnterFrame=function(){
rotate++;//I increment the rotation angle
drawLine(rotate);//I call the drawLine function each frame with the rotate variable as parameter
}
function drawLine(rot:Number){
number++;//I increment the line count
if(number>180){number=0}//I don't want more than 180 lines on the screen
this.createEmptyMovieClip("line"+number, number);//create lines
this["line"+number].lineStyle(4,0x00FF00,100);
this["line"+number].moveTo(0,0);
this["line"+number].lineTo(200,0);
this["line"+number]._x=Stage.width/2;//position lines
this["line"+number]._y=Stage.height/2;//position lines
this["line"+number]._rotation+=rot;//rotate lines
this["line"+number].onEnterFrame=function(){
this._alpha-=0.5;//fade lines
}
}