Показать сообщение отдельно
Старый 15.02.2009, 20:06
Sever_a вне форума Посмотреть профиль Отправить личное сообщение для Sever_a Найти все сообщения от Sever_a
  № 1  
Ответить с цитированием
Sever_a

Регистрация: Oct 2008
Сообщений: 15
По умолчанию Вращение линии по окружности средствами 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 
}
}
Почему этот код не работает? ругается на строку
}function drawLine(rot:Number){


Последний раз редактировалось iNils; 15.02.2009 в 20:48.