Палочки с сайта djyarus.info _quality="HIGH" pos = {x:0, y:0} i=0; stageWidth=Stage.width; stageHeight=Stage.height; placeLine=function() { if (i==20) { this.clear(); i=0 } else { var thichness=random(100); // от 0 до 99 var lineColor=random(16777215) this.lineStyle(thickness, lineColor, random(100)); //this.lineStyle(thickness, lineColor, random(100), true. "none", "square", "meter", 1 // доступ к элементам объекта осюществляется через "." pos.x=random(stageWidth); // pos.x=Math.random()*stageWidth; pos.y=Math.random()*stageHeight; this.lineTo(pos.x, pos.y); // инкримент переменной i=i+1, i+=1 i++; } } // onEnterFrame - команда которая вызывает шкалу времени. скорость работы 12fps this.onEnterFrame=placeLine; ------------------------ Создание шарика средствами API и его анимация по траектории cnt=0; function drawCircle(x, y, radius, cWidth) { me=_root.createEmptyMovieClip("circle"+cnt, 2); me.lineStyle(radius, 0x000000, 100); me.moveTo(x, y); me.lineTo(x, y+.15); me.lineStyle(radius-cWidth, 0xFFFFFF, 100); me.moveTo(x, y); me.lineTo(x, y+.15); } //вызов функции drawCircle(0,0,20,20); //анимация this.onEnterFrame = function() { D1=300; D2=100; theta=theta++; rad=thetd*(Math.PI/180); _root.circle0._x=(D1*Math.cos(rad)/2); _root.circle0._y=(D2*Math.sion(rad)/2)+200; clear(); lineStyle(1,0,100); moveTo(200, 200); lineTo(_root.circle0._x, _root.corcle0._y); lineTo(_root.circle0._x, 200); lineTo(275, 200); }